remove ids from mcu related
This commit is contained in:
No files matched your search
@@ -6,10 +6,10 @@ import (
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code" validate:"maxLength=20"`
|
||||
Code *string `json:"code" validate:"maxLength=20"`
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
McuSrcCategory_Code *string `json:"mcuSrcCategory_code" validate:"maxLength=20"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item_Code *string `json:"item_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -27,17 +27,18 @@ type FilterDto struct {
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Id *uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Id *uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Id *uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
@@ -51,7 +52,7 @@ type ResponseDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
McuSrcCategory_Code *string `json:"mcuSrcCategory_code"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item_Code *string `json:"item_code"`
|
||||
Item *ei.Item `json:"item,omitempty"`
|
||||
}
|
||||
|
||||
@@ -60,7 +61,7 @@ func (d McuSrc) ToResponse() ResponseDto {
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
McuSrcCategory_Code: d.McuSrcCategory_Code,
|
||||
Item_Id: d.Item_Id,
|
||||
Item_Code: d.Item_Code,
|
||||
Item: d.Item,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
|
||||
@@ -12,7 +12,6 @@ type McuSrc struct {
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
McuSrcCategory_Code *string `json:"mcuSrcCategory_code" gorm:"size:20"`
|
||||
McuSrcCategory *emsc.McuSrcCategory `json:"mcuSrcCategory,omitempty" gorm:"foreignKey:McuSrcCategory_Code;references:Code"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item_Code *string `json:"item_code"`
|
||||
Item *ei.Item `json:"item,omitempty" gorm:"foreignKey:Item_Id;references:Id"`
|
||||
Item *ei.Item `json:"item,omitempty" gorm:"foreignKey:Item_Code;references:Code"`
|
||||
}
|
||||
@@ -7,10 +7,10 @@ import (
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code" validate:"maxLength=20"`
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
McuSrc_Id *uint `json:"mcuSrc_id"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Code *string `json:"code" validate:"maxLength=20"`
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
McuSrc_Code *string `json:"mcuSrc_code"`
|
||||
Item_Code *string `json:"item_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -21,24 +21,25 @@ type ReadListDto struct {
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Code *string `json:"code"`
|
||||
Name *string `json:"name"`
|
||||
CheckupCategory_Code *string `json:"checkupCategory-code"`
|
||||
Search string `json:"search" gormhelper:"searchColumns=Code,Name"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Id *uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Id *uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Id *uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
@@ -49,22 +50,22 @@ type MetaDto struct {
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
McuSrc_Id *uint `json:"mcuSrc_id"`
|
||||
McuSrc *ems.McuSrc `json:"mcuSrc,omitempty"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
McuSrc_Code *string `json:"mcuSrc_code"`
|
||||
McuSrc *ems.McuSrc `json:"mcuSrc,omitempty"`
|
||||
Item_Code *string `json:"item_code"`
|
||||
Item *ei.Item `json:"item,omitempty"`
|
||||
}
|
||||
|
||||
func (d McuSubSrc) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
McuSrc_Id: d.McuSrc_Id,
|
||||
McuSrc: d.McuSrc,
|
||||
Item_Id: d.Item_Id,
|
||||
Item: d.Item,
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
McuSrc_Code: d.McuSrc_Code,
|
||||
McuSrc: d.McuSrc,
|
||||
Item_Code: d.Item_Code,
|
||||
Item: d.Item,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -10,9 +10,8 @@ type McuSubSrc struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:20"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
McuSrc_Id *uint `json:"mcuSrc_id"`
|
||||
McuSrc_Code *string `json:"mcuSrc_code"`
|
||||
McuSrc *ems.McuSrc `json:"mcuSrc,omitempty" gorm:"foreignKey:McuSrc_Id;references:Id"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty" gorm:"foreignKey:Item_Id;references:Id"`
|
||||
McuSrc *ems.McuSrc `json:"mcuSrc,omitempty" gorm:"foreignKey:McuSrc_Code;references:Code"`
|
||||
Item_Code *string `json:"item_code"`
|
||||
Item *ei.Item `json:"item,omitempty" gorm:"foreignKey:Item_Code;references:Code"`
|
||||
}
|
||||
@@ -8,9 +8,9 @@ import (
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
MedicalActionSrc_Id *uint `json:"medicalActionSrc_id"`
|
||||
ProcedureSrc_Id *uint `json:"procedureSrc_id"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
MedicalActionSrc_Code *string `json:"medicalActionSrc_code"`
|
||||
ProcedureSrc_Code *string `json:"procedureSrc_code"`
|
||||
Item_Code *string `json:"item_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -20,9 +20,9 @@ type ReadListDto struct {
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
MedicalActionSrc_Id *uint `json:"medicalActionSrc-id"`
|
||||
ProcedureSrc_Id *uint `json:"procedureSrc-id"`
|
||||
Item_Id *uint `json:"item-id"`
|
||||
MedicalActionSrc_Code *string `json:"medicalActionSrc-code"`
|
||||
ProcedureSrc_Code *string `json:"procedureSrc-code"`
|
||||
Item_Code *string `json:"item-code"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
@@ -46,22 +46,22 @@ type MetaDto struct {
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
MedicalActionSrc_Id *uint `json:"medicalActionSrc_id"`
|
||||
MedicalActionSrc *emas.MedicalActionSrc `json:"medicalActionSrc,omitempty"`
|
||||
ProcedureSrc_Id *uint `json:"procedureSrc_id"`
|
||||
ProcedureSrc *eps.ProcedureSrc `json:"procedureSrc,omitempty"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty"`
|
||||
MedicalActionSrc_Code *string `json:"medicalActionSrc_code"`
|
||||
MedicalActionSrc *emas.MedicalActionSrc `json:"medicalActionSrc,omitempty"`
|
||||
ProcedureSrc_Code *string `json:"procedureSrc_code"`
|
||||
ProcedureSrc *eps.ProcedureSrc `json:"procedureSrc,omitempty"`
|
||||
Item_Code *string `json:"item_code"`
|
||||
Item *ei.Item `json:"item,omitempty"`
|
||||
}
|
||||
|
||||
func (d MedicalActionSrcItem) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
MedicalActionSrc_Id: d.MedicalActionSrc_Id,
|
||||
MedicalActionSrc: d.MedicalActionSrc,
|
||||
ProcedureSrc_Id: d.ProcedureSrc_Id,
|
||||
ProcedureSrc: d.ProcedureSrc,
|
||||
Item_Id: d.Item_Id,
|
||||
Item: d.Item,
|
||||
MedicalActionSrc_Code: d.MedicalActionSrc_Code,
|
||||
MedicalActionSrc: d.MedicalActionSrc,
|
||||
ProcedureSrc_Code: d.ProcedureSrc_Code,
|
||||
ProcedureSrc: d.ProcedureSrc,
|
||||
Item_Code: d.Item_Code,
|
||||
Item: d.Item,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -9,13 +9,10 @@ import (
|
||||
|
||||
type MedicalActionSrcItem struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
MedicalActionSrc_Id *uint `json:"medicalActionSrc_id"`
|
||||
MedicalActionSrc_Code *string `json:"medicalActionSrc_code"`
|
||||
MedicalActionSrc *emas.MedicalActionSrc `json:"medicalActionSrc,omitempty" gorm:"foreignKey:MedicalActionSrc_Id;references:Id"`
|
||||
ProcedureSrc_Id *uint `json:"procedureSrc_id"`
|
||||
MedicalActionSrc *emas.MedicalActionSrc `json:"medicalActionSrc,omitempty" gorm:"foreignKey:MedicalActionSrc_Code;references:Code"`
|
||||
ProcedureSrc_Code *string `json:"procedureSrc_code"`
|
||||
ProcedureSrc *eps.ProcedureSrc `json:"procedureSrc,omitempty" gorm:"foreignKey:ProcedureSrc_Id;references:Id"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
ProcedureSrc *eps.ProcedureSrc `json:"procedureSrc,omitempty" gorm:"foreignKey:ProcedureSrc_Code;references:Code"`
|
||||
Item_Code *string `json:"item_code"`
|
||||
Item *ei.Item `json:"item,omitempty" gorm:"foreignKey:Item_Id;references:Id"`
|
||||
Item *ei.Item `json:"item,omitempty" gorm:"foreignKey:Item_Code;references:Code"`
|
||||
}
|
||||
@@ -6,10 +6,10 @@ import (
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code" validate:"maxLength=20"`
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
Type_Code string `json:"type_code" validate:"maxLength=20"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Code *string `json:"code" validate:"maxLength=20"`
|
||||
Name string `json:"name" validate:"maxLength=50"`
|
||||
Type_Code string `json:"type_code" validate:"maxLength=20"`
|
||||
Item_Code *string `json:"item_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -20,25 +20,26 @@ type ReadListDto struct {
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Type_Code string `json:"type_code"`
|
||||
Item_Id *uint `json:"item-id"`
|
||||
Search string `json:"search" gormhelper:"searchColumns=Code,Name"`
|
||||
Code *string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Type_Code string `json:"type_code"`
|
||||
Item_Code *string `json:"item-code"`
|
||||
Search string `json:"search" gormhelper:"searchColumns=Code,Name"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code string `json:"code"`
|
||||
Id *uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
Id *uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
Id *uint `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
@@ -52,7 +53,7 @@ type ResponseDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Type_Code string `json:"type_code"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item_Code *string `json:"item_code"`
|
||||
Item *ei.Item `json:"item,omitempty"`
|
||||
}
|
||||
|
||||
@@ -61,7 +62,7 @@ func (d MedicalActionSrc) ToResponse() ResponseDto {
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
Type_Code: d.Type_Code,
|
||||
Item_Id: d.Item_Id,
|
||||
Item_Code: d.Item_Code,
|
||||
Item: d.Item,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
|
||||
@@ -10,7 +10,6 @@ type MedicalActionSrc struct {
|
||||
Code string `json:"code" gorm:"unique;size:20"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Type_Code string `json:"type_code" gorm:"size:20"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item_Code *string `json:"item_code"`
|
||||
Item *ei.Item `json:"item,omitempty" gorm:"foreignKey:Item_Id;references:Id"`
|
||||
Item *ei.Item `json:"item,omitempty" gorm:"foreignKey:Item_Code;references:Code"`
|
||||
}
|
||||
Reference in New Issue
Block a user