expand infragroup_code size to 15

This commit is contained in:
dpurbosakti
2025-10-08 14:36:58 +07:00
parent 1c58708cd7
commit 1c57fac2bf
3 changed files with 37 additions and 34 deletions
@@ -12,7 +12,7 @@ type Infra struct {
ecore.SmallMain // adjust this according to the needs
Code string `json:"code" gorm:"unique;size:10"`
Name string `json:"name" gorm:"size:50"`
InfraGroup_Code ero.InfraGroupCode `json:"infraGroup_code" gorm:"size:10"`
InfraGroup_Code ero.InfraGroupCode `json:"infraGroup_code" gorm:"size:15"`
Parent_Id *uint16 `json:"parent_id"`
Parent *Infra `json:"parent" gorm:"foreignKey:Parent_Id;references:Id"`
Childrens []Infra `json:"childrens" gorm:"foreignKey:Parent_Id"` // may need references to self