12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- package dto
- import (
- "gas-cylinder-api/app/admin/model"
- "gas-cylinder-api/common/dto"
- common "gas-cylinder-api/common/model"
- )
- type GasCylinderSpecGetPageReq struct {
- dto.Pagination `search:"-"`
- Name string `form:"name" search:"type:contains;column:name;table:gas_cylinder_spec"` // 商品名称
- GasCylinderSpecOrder
- }
- type GasCylinderSpecOrder struct {
- CreatedAtOrder string `search:"type:order;column:created_at;table:gas_cylinder_spec" form:"createdAtOrder" default:"desc"`
- }
- func (m *GasCylinderSpecGetPageReq) GetNeedSearch() interface{} {
- return *m
- }
- type GasCylinderSpecInsertReq struct {
- Id int `json:"id" comment:"编码" swaggerignore:"true"` // 编码
- Name string `json:"name"` // 商品名称
- Remark string `json:"remark"` // 备注
- common.ControlBy `swaggerignore:"true"`
- common.DeptBy `swaggerignore:"true"`
- }
- func (s *GasCylinderSpecInsertReq) Generate(model *model.GasCylinderSpec) {
- if s.Id != 0 {
- model.Id = s.Id
- }
- model.Name = s.Name
- model.Remark = s.Remark
- 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 *GasCylinderSpecInsertReq) GetId() interface{} {
- return s.Id
- }
- type GasCylinderSpecUpdateReq struct {
- Id int `json:"id" comment:"编码"` // 编码
- Name string `json:"name"` // 商品名称
- Remark string `json:"remark"` // 备注
- common.ControlBy `swaggerignore:"true"`
- }
- func (s *GasCylinderSpecUpdateReq) Generate(model *model.GasCylinderSpec) {
- if s.Id != 0 {
- model.Id = s.Id
- }
- model.Name = s.Name
- model.Remark = s.Remark
- if s.ControlBy.UpdateBy != 0 {
- model.UpdateBy = s.UpdateBy
- }
- if s.ControlBy.CreateBy != 0 {
- model.CreateBy = s.CreateBy
- }
- }
- func (s *GasCylinderSpecUpdateReq) GetId() interface{} {
- return s.Id
- }
- type GasCylinderSpecGetReq struct {
- Id int `uri:"id"`
- }
- func (s *GasCylinderSpecGetReq) GetId() interface{} {
- return s.Id
- }
- type GasCylinderSpecDeleteReq struct {
- Id int `json:"id"`
- common.ControlBy `swaggerignore:"true"`
- }
- func (s *GasCylinderSpecDeleteReq) GetId() interface{} {
- return s.Id
- }
|