Feat(BE-36,37,38,39): finish master data management api

This commit is contained in:
Hafizh A. Y
2025-10-03 21:04:21 +07:00
parent e8905be856
commit 2d49ffe4cd
103 changed files with 6974 additions and 117 deletions
+17
View File
@@ -0,0 +1,17 @@
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"`
}