fill_ckeck.go 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. package dto
  2. import (
  3. "gas-cylinder-api/app/admin/model"
  4. "gas-cylinder-api/common/dto"
  5. common "gas-cylinder-api/common/model"
  6. )
  7. type FillCheckGetPageReq struct {
  8. dto.Pagination `search:"-"`
  9. InnerCode string `form:"innerCode" search:"type:contains;column:inner_code;table:fill_check"` //
  10. FillCheckOrder
  11. }
  12. type FillCheckOrder struct {
  13. CreatedAtOrder string `search:"type:order;column:created_at;table:fill_check" form:"createdAtOrder" default:"desc"`
  14. }
  15. func (m *FillCheckGetPageReq) GetNeedSearch() interface{} {
  16. return *m
  17. }
  18. type FillCheckInsertReq struct {
  19. Id int `json:"id" comment:"编码" swaggerignore:"true"` // 编码
  20. UserId int `swaggerignore:"true"` // 用户id
  21. //ChipUid string `json:"chipUid" vd:"len($)>0;msg:'高频编码不能为空'"` // 高频编码
  22. model.ProvFillCheck
  23. common.ControlBy `swaggerignore:"true"`
  24. common.DeptBy `swaggerignore:"true"`
  25. }
  26. func (s *FillCheckInsertReq) Generate(model *model.FillCheck) {
  27. if s.Id != 0 {
  28. model.Id = s.Id
  29. }
  30. model.UserId = s.UserId
  31. model.ProvFillCheck = s.ProvFillCheck
  32. if s.ControlBy.UpdateBy != 0 {
  33. model.UpdateBy = s.UpdateBy
  34. }
  35. if s.ControlBy.CreateBy != 0 {
  36. model.CreateBy = s.CreateBy
  37. }
  38. if s.DeptBy.DeptId != 0 {
  39. model.DeptId = s.DeptId
  40. }
  41. }
  42. func (s *FillCheckInsertReq) GetId() interface{} {
  43. return s.Id
  44. }
  45. type FillCheckGetReq struct {
  46. Id int `uri:"id"`
  47. }
  48. func (s *FillCheckGetReq) GetId() interface{} {
  49. return s.Id
  50. }