This commit is contained in:
dpurbosakti
2025-09-04 21:15:11 +07:00
parent 56d9513dd7
commit dd409e5c5e
11 changed files with 59 additions and 20 deletions
@@ -12,8 +12,8 @@ type Doctor struct {
ecore.Main // adjust this according to the needs
Employee_Id *uint `json:"employee_id"`
Employee *ee.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
IHS_Number *string `json:"ihs_number" gorm:"size:20"`
SIP_Number *string `json:"sip_number" gorm:"size:20"`
IHS_Number *string `json:"ihs_number" gorm:"unique;size:20"`
SIP_Number *string `json:"sip_number" gorm:"unique;size:20"`
Unit_Id *uint16 `json:"unit_id"`
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Id;references:Id"`
Specialist_Id *uint16 `json:"specialist_id"`
@@ -9,5 +9,5 @@ type Laborant struct {
ecore.Main // adjust this according to the needs
Employee_Id *uint `json:"employee_id"`
Employee *ee.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
IHS_Number *string `json:"ihs_number" gorm:"size:20"`
IHS_Number *string `json:"ihs_number" gorm:"unique;size:20"`
}
@@ -11,7 +11,7 @@ type Nurse struct {
ecore.Main // adjust this according to the needs
Employee_Id *uint `json:"employee_id"`
Employee *ee.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
IHS_Number *string `json:"ihs_number" gorm:"size:20"`
IHS_Number *string `json:"ihs_number" gorm:"unique;size:20"`
Unit_Id *uint16 `json:"unit_id"`
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Id;references:Id"`
Infra_Id *uint16 `json:"infra_id"`
@@ -9,5 +9,5 @@ type Nutritionist struct {
ecore.Main // adjust this according to the needs
Employee_Id *uint `json:"employee_id"`
Employee *ee.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
IHS_Number *string `json:"ihs_number" gorm:"size:20"`
IHS_Number *string `json:"ihs_number" gorm:"unique;size:20"`
}
@@ -9,5 +9,5 @@ type Pharmacist struct {
ecore.Main // adjust this according to the needs
Employee_Id *uint `json:"employee_id"`
Employee *ee.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
IHS_Number *string `json:"ihs_number" gorm:"size:20"`
IHS_Number *string `json:"ihs_number" gorm:"unique;size:20"`
}