package dto import ( "gas-cylinder-api/app/admin/model" "gas-cylinder-api/common/dto" common "gas-cylinder-api/common/model" ) type FillGunGetPageReq struct { dto.Pagination `search:"-"` GunCode string `form:"gunCode" search:"type:contains;column:gun_code;table:fill_gun"` // 充装枪编码 ScanGunCode string `form:"scanGunCode" search:"type:contains;column:scan_gun_code;table:fill_gun"` // 扫描枪编码 PersonCode string `form:"personCode" search:"type:contains;column:person_Code;table:fill_gun"` // 充装人员编码 FillGunOrder } type FillGunOrder struct { CreatedAtOrder string `search:"type:order;column:created_at;table:fill_gun" form:"createdAtOrder" default:"desc"` } func (m *FillGunGetPageReq) GetNeedSearch() interface{} { return *m } type FillGunInsertReq struct { Id int `json:"id" comment:"编码" swaggerignore:"true"` // 编码 GunCode string `json:"gunCode"` // 充装枪编码 ScanGunCode string `json:"scanGunCode"` // 扫描枪编码 PersonCode string `json:"personCode"` // 充装人员编码 Remark string `json:"remark"` // 备注 common.ControlBy `swaggerignore:"true"` common.DeptBy `swaggerignore:"true"` } func (s *FillGunInsertReq) Generate(m *model.FillGun) { if s.Id != 0 { m.Id = s.Id } m.GunCode = s.GunCode m.ScanGunCode = s.ScanGunCode m.PersonCode = s.PersonCode m.Remark = s.Remark if s.ControlBy.UpdateBy != 0 { m.UpdateBy = s.UpdateBy } if s.ControlBy.CreateBy != 0 { m.CreateBy = s.CreateBy } if s.DeptBy.DeptId != 0 { m.DeptId = s.DeptId } } func (s *FillGunInsertReq) GetId() interface{} { return s.Id } type FillGunUpdateReq struct { Id int `json:"id" comment:"编码"` // 编码 GunCode string `json:"gunCode"` // 充装枪编码 ScanGunCode string `json:"scanGunCode"` // 扫描枪编码 PersonCode string `json:"personCode"` // 充装人员编码 Remark string `json:"remark"` // 备注 common.ControlBy `swaggerignore:"true"` } func (s *FillGunUpdateReq) Generate(m *model.FillGun) { if s.Id != 0 { m.Id = s.Id } m.GunCode = s.GunCode m.ScanGunCode = s.ScanGunCode m.PersonCode = s.PersonCode m.Remark = s.Remark if s.ControlBy.UpdateBy != 0 { m.UpdateBy = s.UpdateBy } if s.ControlBy.CreateBy != 0 { m.CreateBy = s.CreateBy } } func (s *FillGunUpdateReq) GetId() interface{} { return s.Id } type FillGunGetReq struct { Id int `uri:"id"` } func (s *FillGunGetReq) GetId() interface{} { return s.Id } type FillGunDeleteReq struct { Id int `json:"id"` common.ControlBy `swaggerignore:"true"` } func (s *FillGunDeleteReq) GetId() interface{} { return s.Id }