mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 21:41:55 +00:00
18 lines
590 B
Go
18 lines
590 B
Go
package entities
|
|
|
|
import "time"
|
|
|
|
const (
|
|
FlagableTypeProduct = "products"
|
|
FlagableTypeNonstock = "nonstocks"
|
|
)
|
|
|
|
type Flag struct {
|
|
Id uint `gorm:"primaryKey"`
|
|
Name string `gorm:"not null;uniqueIndex:flags_unique_flagable"`
|
|
FlagableID uint `gorm:"not null;uniqueIndex:flags_unique_flagable;index:flags_flagable_lookup,priority:2"`
|
|
FlagableType string `gorm:"size:50;not null;uniqueIndex:flags_unique_flagable;index:flags_flagable_lookup,priority:1"`
|
|
CreatedAt time.Time `gorm:"autoCreateTime"`
|
|
UpdatedAt time.Time `gorm:"autoUpdateTime"`
|
|
}
|