fix laborant table

This commit is contained in:
dpurbosakti
2025-09-04 12:01:54 +07:00
parent eda0454ad6
commit 850ff7615c
4 changed files with 15 additions and 11 deletions
@@ -51,11 +51,11 @@ type ResponseDto struct {
func (d Laborant) ToResponse() ResponseDto {
resp := ResponseDto{
Code: d.Code,
Name: d.Name,
Parent_Id: d.Parent_Id,
// Code: d.Code,
// Name: d.Name,
// Parent_Id: d.Parent_Id,
}
resp.SmallMain = d.SmallMain
// resp.SmallMain = d.SmallMain
return resp
}
@@ -2,11 +2,12 @@ package laborant
import (
ecore "simrs-vx/internal/domain/base-entities/core"
ee "simrs-vx/internal/domain/main-entities/employee"
)
type Laborant 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.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"`
}