feat (medicine-mix-item): add note
This commit is contained in:
@@ -6,9 +6,10 @@ import (
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
Medicine_Id *uint `json:"medicine_id"`
|
||||
Dose *uint8 `json:"dose"`
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
Medicine_Id *uint `json:"medicine_id"`
|
||||
Dose *uint8 `json:"dose"`
|
||||
Note *string `json:"note" gom:"size:1024"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -18,9 +19,10 @@ type ReadListDto struct {
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
Medicine_Id *uint `json:"medicine_id"`
|
||||
Dose *uint8 `json:"dose"`
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
Medicine_Id *uint `json:"medicine_id"`
|
||||
Dose *uint8 `json:"dose"`
|
||||
Note *string `json:"note" gom:"size:1024"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
@@ -52,6 +54,7 @@ type ResponseDto struct {
|
||||
Medicine_Id *uint `json:"medicine_id"`
|
||||
Medicine *em.Medicine `json:"medicine,omitempty"`
|
||||
Dose *uint8 `json:"dose"`
|
||||
Note *string `json:"note" gom:"size:1024"`
|
||||
}
|
||||
|
||||
func (d MedicineMixItem) ToResponse() ResponseDto {
|
||||
@@ -60,6 +63,7 @@ func (d MedicineMixItem) ToResponse() ResponseDto {
|
||||
Medicine_Id: d.Medicine_Id,
|
||||
Medicine: d.Medicine,
|
||||
Dose: d.Dose,
|
||||
Note: d.Note,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -20,4 +20,5 @@ func setData[T *e.CreateDto | *e.UpdateDto](input T, data *e.MedicineMixItem) {
|
||||
data.MedicineMix_Id = inputSrc.MedicineMix_Id
|
||||
data.Medicine_Id = inputSrc.Medicine_Id
|
||||
data.Dose = inputSrc.Dose
|
||||
data.Note = inputSrc.Note
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user