change srcUnit_id into code
This commit is contained in:
@@ -20,7 +20,6 @@ import (
|
||||
type CreateDto struct {
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Status_Code erc.DataVerifiedCode `json:"status_code"`
|
||||
SrcUnit_Id *uint `json:"srcUnit_id"`
|
||||
SrcUnit_Code *string `json:"srcUnit_code"`
|
||||
}
|
||||
|
||||
@@ -34,7 +33,6 @@ type FilterDto struct {
|
||||
Encounter_Id *uint `json:"encounter-id"`
|
||||
Status_Code *erc.DataVerifiedCode `json:"status-code"`
|
||||
VerifiedBy_User_Id *uint `json:"verifiedBy-user-id"`
|
||||
SrcUnit_Id *uint `json:"srcUnit-id"`
|
||||
SrcUnit_Code *string `json:"srcUnit-code"`
|
||||
}
|
||||
|
||||
@@ -74,7 +72,6 @@ type ResponseDto struct {
|
||||
VerifiedAt *time.Time `json:"verifiedAt"`
|
||||
VerifiedBy_User_Id *uint `json:"verifiedBy_user_id"`
|
||||
VerifiedBy *eus.User `json:"verifiedBy,omitempty"`
|
||||
SrcUnit_Id *uint `json:"srcUnit_id"`
|
||||
SrcUnit_Code *string `json:"srcUnit_code"`
|
||||
SrcUnit *eun.Unit `json:"srcUnit,omitempty"`
|
||||
}
|
||||
@@ -87,7 +84,6 @@ func (d Chemo) ToResponse() ResponseDto {
|
||||
VerifiedAt: d.VerifiedAt,
|
||||
VerifiedBy_User_Id: d.VerifiedBy_User_Id,
|
||||
VerifiedBy: d.VerifiedBy,
|
||||
SrcUnit_Id: d.SrcUnit_Id,
|
||||
SrcUnit_Code: d.SrcUnit_Code,
|
||||
SrcUnit: d.SrcUnit,
|
||||
}
|
||||
|
||||
@@ -19,9 +19,8 @@ type Chemo struct {
|
||||
VerifiedAt *time.Time `json:"verifiedAt"`
|
||||
VerifiedBy_User_Id *uint `json:"verifiedBy_user_id"`
|
||||
VerifiedBy *eus.User `json:"verifiedBy,omitempty" gorm:"foreignKey:VerifiedBy_User_Id;references:Id"`
|
||||
SrcUnit_Id *uint `json:"src_unit_id"`
|
||||
SrcUnit_Code *string `json:"src_unit_code"`
|
||||
SrcUnit *eun.Unit `json:"src_unit,omitempty" gorm:"foreignKey:SrcUnit_Id;references:Id"`
|
||||
SrcUnit *eun.Unit `json:"src_unit,omitempty" gorm:"foreignKey:SrcUnit_Code;references:Code"`
|
||||
Bed *string `json:"bed" gorm:"size:1024"`
|
||||
Needs *string `json:"needs" gorm:"size:2048"`
|
||||
}
|
||||
|
||||
@@ -19,5 +19,5 @@ func setData[T *e.CreateDto | *e.UpdateDto](input T, data *e.Chemo) {
|
||||
|
||||
data.Encounter_Id = inputSrc.Encounter_Id
|
||||
data.Status_Code = inputSrc.Status_Code
|
||||
data.SrcUnit_Id = inputSrc.SrcUnit_Id
|
||||
data.SrcUnit_Code = inputSrc.SrcUnit_Code
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user