1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- 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:"-"`
- CustomerId string `form:"customerId" search:"type:contains;column:customer_id;table:address"` // 角色名称
- }
- 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
- }
|