git commit -m "migration updates"

This commit is contained in:
dpurbosakti
2025-10-02 16:02:47 +07:00
parent 92d4fb8d38
commit fe0fcecf80
4 changed files with 34 additions and 28 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"`
}