Merge branch 'migration' of github.com:dikstub-rssa/simrs-be into fix/anything-moko

This commit is contained in:
dpurbosakti
2025-10-02 16:08:20 +07:00
4 changed files with 13 additions and 8 deletions
@@ -5,8 +5,10 @@ import (
)
type Division struct {
ecore.SmallMain // adjust this according to the needs
Code string `json:"code" gorm:"unique;size:10"`
Name string `json:"name" gorm:"size:50"`
Parent_Id *int16 `json:"parent_id"`
ecore.SmallMain // adjust this according to the needs
Code string `json:"code" gorm:"unique;size:10"`
Name string `json:"name" gorm:"size:50"`
Parent_Id *int16 `json:"parent_id"`
Parent *Division `gorm:"foreignKey:Parent_Id;references:Id"`
Childrens []Division `gorm:"foreignKey:Parent_Id"` // may need references to self
}