123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- package dto
- import (
- "cold-delivery/app/admin/model"
- "cold-delivery/common/dto"
- common "cold-delivery/common/model"
- )
- type IceRaftGetPageReq struct {
- dto.Pagination `search:"-"`
- Code string `form:"code" search:"type:contains;column:code;table:ice_raft"` // 冰排名称
- Status string `form:"status" search:"type:exact;column:status;table:ice_raft"` // 状态
- IceRaftOrder
- }
- type IceRaftGetNewestRecordPageReq struct {
- dto.Pagination `search:"-"`
- Code string `form:"code" search:"type:contains;column:code;table:ice_raft"` // 冰排名称
- Status string `form:"status" search:"-"` // 状态
- IceLockerId int `form:"iceLockerId" search:"-"` // 冷冻柜id
- CoolerBoxId int `form:"coolerBoxId" search:"-"` // 保温箱id
- IceRaftOrder
- }
- type GetPageByCoolerBoxIdReq struct {
- CoolerBoxId int `form:"coolerBoxId" search:"-"` // 保温箱id
- IceRaftOrder
- }
- type IceRaftOrder struct {
- CreatedAtOrder string `search:"type:order;column:created_at;table:ice_raft" form:"createdAtOrder" default:"desc"`
- IdOrder string `search:"type:order;column:id;table:ice_raft" form:"idOrder" default:"desc"`
- }
- func (m *IceRaftGetPageReq) GetNeedSearch() interface{} {
- return *m
- }
- func (m *IceRaftGetNewestRecordPageReq) GetNeedSearch() interface{} {
- return *m
- }
- type IceRaftInsertReq struct {
- Id int `json:"id" comment:"编码" swaggerignore:"true"` // 编码
- CodeList []string `json:"codeList" vd:"len($)>0;msg:'冰排编号不能为空'"` // 冰排名称
- Status string `json:"status"` // 1-停用 2-正常
- FreezeClaim float32 `json:"freezeClaim"` // 冷冻要求 单位小时
- Label string `json:"label"` // 标签
- common.ControlBy `swaggerignore:"true"`
- common.DeptBy `swaggerignore:"true"`
- }
- func (s *IceRaftInsertReq) Generate(model *model.IceRaft, code string) {
- if s.Id != 0 {
- model.Id = s.Id
- }
- model.Code = code
- model.Status = s.Status
- model.FreezeClaim = s.FreezeClaim
- model.Label = s.Label
- 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 *IceRaftInsertReq) GetId() interface{} {
- return s.Id
- }
- type IceRaftUpdateReq struct {
- Id int `json:"id" comment:"编码"` // 编码
- Label string `json:"label" gorm:"size:128;comment:标签"` // 标签
- Code string `json:"code" vd:"len($)>0;msg:'冰排编号不能为空'"` // 冰排名称
- Status string `json:"status"` // 1-停用 2-正常
- FreezeClaim float32 `json:"freezeClaim"` // 冷冻要求 单位小时
- common.ControlBy `swaggerignore:"true"`
- }
- func (s *IceRaftUpdateReq) Generate(model *model.IceRaft) {
- if s.Id != 0 {
- model.Id = s.Id
- }
- model.Code = s.Code
- model.Status = s.Status
- model.FreezeClaim = s.FreezeClaim
- model.Label = s.Label
- if s.ControlBy.UpdateBy != 0 {
- model.UpdateBy = s.UpdateBy
- }
- if s.ControlBy.CreateBy != 0 {
- model.CreateBy = s.CreateBy
- }
- }
- func (s *IceRaftUpdateReq) GetId() interface{} {
- return s.Id
- }
- type IceRaftGetReq struct {
- Id int `uri:"id"`
- }
- func (s *IceRaftGetReq) GetId() interface{} {
- return s.Id
- }
- type IceRaftGetByCodeReq struct {
- Code string `uri:"code"`
- }
- type IceRaftDeleteReq struct {
- Id int `json:"id"`
- common.ControlBy `swaggerignore:"true"`
- }
- func (s *IceRaftDeleteReq) GetId() interface{} {
- return s.Id
- }
- type IceRaftInStorageReq struct {
- Code []string `json:"code"`
- IceLockerId int `json:"iceLockerId"` // 冷冻柜id
- FreezeClaim float32 `json:"freezeClaim"` // 冷冻要求
- common.ControlBy `swaggerignore:"true"`
- }
- type IceRaftOutStorageReq struct {
- Code []string `json:"code"`
- CoolerBoxId int `json:"coolerBoxId"` // 保温箱id
- common.ControlBy `swaggerignore:"true"`
- }
- type IceRaftRecordGetPageReq struct {
- dto.Pagination `search:"-"`
- IceRaftId int `form:"iceRaftId" search:"type:exact;column:ice_raft_id;table:ice_raft_record" vd:"$>0;msg:'冰排id不能为空'"` // 冰排id
- Status string `form:"status" search:"type:exact;column:status;table:ice_raft_record"` // 状态
- IceRaftRecordOrder
- }
- type IceRaftRecordOrder struct {
- CreatedAtOrder string `search:"type:order;column:created_at;table:ice_raft_record" form:"createdAtOrder" default:"desc"`
- }
- func (m *IceRaftRecordGetPageReq) GetNeedSearch() interface{} {
- return *m
- }
- type IceRaftRecordUpdateReq struct {
- Id int `json:"id" comment:"编码"` // 编码
- IceLockerId int `json:"iceLockerId"` // 冷冻柜id
- CoolerBoxId int `json:"coolerBoxId"` // 保温箱id
- FreezeClaim float32 `json:"freezeClaim"` // 冷冻要求 单位小时
- common.ControlBy `swaggerignore:"true"`
- }
- func (s *IceRaftRecordUpdateReq) GetId() interface{} {
- return s.Id
- }
- func (s *IceRaftRecordUpdateReq) Generate(model *model.IceRaftRecord) {
- if s.Id != 0 {
- model.Id = s.Id
- }
- model.IceLockerId = s.IceLockerId
- model.CoolerBoxId = s.CoolerBoxId
- model.FreezeClaim = s.FreezeClaim
- if s.ControlBy.UpdateBy != 0 {
- model.UpdateBy = s.UpdateBy
- }
- if s.ControlBy.CreateBy != 0 {
- model.CreateBy = s.CreateBy
- }
- }
- type IceRaftRecordDeleteReq struct {
- Id int `json:"id"`
- common.ControlBy `swaggerignore:"true"`
- }
- func (s *IceRaftRecordDeleteReq) GetId() interface{} {
- return s.Id
- }
|