package dto import ( "gas-cylinder-api/app/admin/model" "gas-cylinder-api/common/dto" common "gas-cylinder-api/common/model" ) // 入库安全检查 type InspectExpandGetPageReq struct { dto.Pagination `search:"-"` InspectExpandOrder } type InspectExpandOrder struct { CreatedAtOrder string `search:"type:order;column:created_at;table:inspect_expand" form:"createdAtOrder" default:"asc"` } func (m *InspectExpandGetPageReq) GetNeedSearch() interface{} { return *m } type InspectExpandInsertReq struct { Id int `json:"id" comment:"编码" swaggerignore:"true"` // 编码 InspectExplain string `json:"inspectExplain"` common.ControlBy `swaggerignore:"true"` common.DeptBy `swaggerignore:"true"` } func (s *InspectExpandInsertReq) Generate(model *model.InspectExpand) { if s.Id != 0 { model.Id = s.Id } model.InspectExplain = s.InspectExplain if s.ControlBy.UpdateBy != 0 { model.UpdateBy = s.UpdateBy } if s.ControlBy.CreateBy != 0 { model.CreateBy = s.CreateBy } if s.DeptBy.DeptId != 0 { model.DeptId = s.DeptId } } func (s *InspectExpandInsertReq) GetId() interface{} { return s.Id } func (s *InspectExpandInsertReq) UpdateGenerate(model *model.InspectExpand) { if s.Id != 0 { model.Id = s.Id } model.InspectExplain = s.InspectExplain if s.ControlBy.UpdateBy != 0 { model.UpdateBy = s.UpdateBy } if s.ControlBy.CreateBy != 0 { model.CreateBy = s.CreateBy } } type InspectExpandDeleteReq struct { Id int `json:"id" vd:"$>0;msg:'id不能为空'"` common.ControlBy `swaggerignore:"true"` } func (s *InspectExpandDeleteReq) GetId() interface{} { return s.Id } type InspectExpandSyncStoreReq struct { StoreIds []int `json:"storeIds" vd:"len($)>0;msg:'门店id不能为空'"` common.ControlBy `swaggerignore:"true"` }