feat (doctor-fee): change naming
This commit is contained in:
@@ -8,17 +8,17 @@ import (
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
FeeTypeCode *erc.DoctorFeeTypeCode `json:"feeType_code"`
|
||||
Price *float64 `json:"price"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
FeeType_Code *erc.DoctorFeeTypeCode `json:"feeType_code"`
|
||||
Price *float64 `json:"price"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
FeeTypeCode *erc.DoctorFeeTypeCode `json:"feeType_code"`
|
||||
Price *float64 `json:"price"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
FeeType_Code *erc.DoctorFeeTypeCode `json:"feeType_code"`
|
||||
Price *float64 `json:"price"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
@@ -26,11 +26,11 @@ type ReadListDto struct {
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
FeeTypeCode *erc.DoctorFeeTypeCode `json:"feeType_code"`
|
||||
Price *float64 `json:"price"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Id uint16 `json:"id"`
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
FeeType_Code *erc.DoctorFeeTypeCode `json:"feeType_code"`
|
||||
Price *float64 `json:"price"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
@@ -50,22 +50,22 @@ type MetaDto struct {
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty"`
|
||||
FeeTypeCode *erc.DoctorFeeTypeCode `json:"feeType_code"`
|
||||
Price *float64 `json:"price"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty"`
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty"`
|
||||
FeeType_Code *erc.DoctorFeeTypeCode `json:"feeType_code"`
|
||||
Price *float64 `json:"price"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty"`
|
||||
}
|
||||
|
||||
func (d DoctorFee) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Doctor_Id: d.Doctor_Id,
|
||||
Doctor: d.Doctor,
|
||||
FeeTypeCode: d.FeeTypeCode,
|
||||
Price: d.Price,
|
||||
Item_Id: d.Item_Id,
|
||||
Item: d.Item,
|
||||
Doctor_Id: d.Doctor_Id,
|
||||
Doctor: d.Doctor,
|
||||
FeeType_Code: d.FeeType_Code,
|
||||
Price: d.Price,
|
||||
Item_Id: d.Item_Id,
|
||||
Item: d.Item,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -8,11 +8,11 @@ import (
|
||||
)
|
||||
|
||||
type DoctorFee struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Id;references:Id"`
|
||||
FeeTypeCode *erc.DoctorFeeTypeCode `json:"feeType_code" gorm:"size:11"`
|
||||
Price *float64 `json:"price"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty" gorm:"foreignKey:Item_Id;references:Id"`
|
||||
ecore.Main // adjust this according to the needs
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Id;references:Id"`
|
||||
FeeType_Code *erc.DoctorFeeTypeCode `json:"feeType_code" gorm:"size:11"`
|
||||
Price *float64 `json:"price"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty" gorm:"foreignKey:Item_Id;references:Id"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user