[FIX/BE-US] adjustment recording

This commit is contained in:
ragilap
2026-01-15 15:42:57 +07:00
parent 7f2401311b
commit f1032b44d1
2 changed files with 17 additions and 13 deletions
@@ -18,13 +18,14 @@ type KandangWithPivotDTO struct {
type ProjectFlockWithPivotDTO struct {
ProjectFlockRelationDTO
Area *areaDTO.AreaRelationDTO `json:"area,omitempty"`
Category string `json:"category"`
Fcr *fcrDTO.FcrRelationDTO `json:"fcr,omitempty"`
ProductionStandard *productionStandardDTO.ProductionStandardRelationDTO `json:"production_standard,omitempty"`
Location *locationDTO.LocationRelationDTO `json:"location,omitempty"`
Kandangs []KandangWithPivotDTO `json:"kandangs,omitempty"`
CreatedUser *userDTO.UserRelationDTO `json:"created_user,omitempty"`
Area *areaDTO.AreaRelationDTO `json:"area,omitempty"`
Category string `json:"category"`
Fcr *fcrDTO.FcrRelationDTO `json:"fcr,omitempty"`
ProductionStandard *productionStandardDTO.ProductionStandardRelationDTO `json:"production_standard,omitempty"`
ProductionStandardId uint `json:"production_standard_id"`
Location *locationDTO.LocationRelationDTO `json:"location,omitempty"`
Kandangs []KandangWithPivotDTO `json:"kandangs,omitempty"`
CreatedUser *userDTO.UserRelationDTO `json:"created_user,omitempty"`
}
type ProjectFlockKandangDTO struct {
@@ -55,7 +56,8 @@ func ToProjectFlockKandangDTO(e entity.ProjectFlockKandang) ProjectFlockKandangD
Period: e.Period,
FlockName: e.ProjectFlock.FlockName,
},
Category: e.ProjectFlock.Category,
Category: e.ProjectFlock.Category,
ProductionStandardId: e.ProjectFlock.ProductionStandardId,
}
if e.ProjectFlock.Area.Id != 0 {