package entities

import "time"

const (
	FlagableTypeProduct  = "products"
	FlagableTypeNonstock = "nonstocks"
)

type Flag struct {
	Id           uint      `gorm:"primaryKey"`
	Name         string    `gorm:"type:varchar(50);size:50;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"`
}
