Merge branch 'migration' of github.com:dikstub-rssa/simrs-be into feat/employee

This commit is contained in:
dpurbosakti
2025-09-04 12:02:37 +07:00
4 changed files with 15 additions and 11 deletions
@@ -56,11 +56,11 @@ type ResponseDto struct {
func (d Laborant) ToResponse() ResponseDto {
resp := ResponseDto{
// Employee_Id: d.Employee_Id,
// Employee: d.Employee,
// IHS_Number: d.IHS_Number,
// Code: d.Code,
// Name: d.Name,
// Parent_Id: d.Parent_Id,
}
// resp.Main = d.Main
// 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"`
}