Merge branch 'migration' of github.com:dikstub-rssa/simrs-be into fix/anything-moko
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user