fix laborant table
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user