vo.go 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. package driversrv
  2. import (
  3. "Cold_Logistic/internal/pkg/common/global"
  4. "Cold_Logistic/internal/server/infra/models"
  5. validation "github.com/go-ozzo/ozzo-validation/v4"
  6. "gogs.baozhida.cn/Cold_Logistic_libs/pkg/contrib/core"
  7. )
  8. type DriverCarInfoReqVO struct {
  9. UserTokey string `json:"userTokey"`
  10. }
  11. type DriverCarInfoRespVO struct {
  12. CarNumber string `json:"carNumber"`
  13. SnCode string `json:"snCode"`
  14. SnIds []global.SnIdVO `json:"snIds"`
  15. }
  16. type TaskPageReqVO struct {
  17. Page core.Page `json:"page"`
  18. Status int `json:"status"`
  19. Search struct {
  20. OrderNo string `json:"orderNo"`
  21. }
  22. }
  23. func (r *TaskPageReqVO) Validate() error {
  24. return validation.ValidateStruct(r, validation.Field(&r.Status, validation.Required))
  25. }
  26. type OrderIntoCarReqVO struct {
  27. OrderId int `json:"orderId"`
  28. OrderSubNo string `json:"orderSubNo"`
  29. }
  30. func (r *OrderIntoCarReqVO) Validate() error {
  31. return validation.ValidateStruct(r,
  32. validation.Field(&r.OrderId, validation.Required),
  33. validation.Field(&r.OrderSubNo, validation.Required, validation.RuneLength(6, 6)),
  34. )
  35. }
  36. type OrderIntoCarRespVO struct {
  37. OrderId int `json:"orderId"`
  38. IntoTime models.MyTime `json:"intoTime"`
  39. }
  40. type ScanIntoReqVO struct {
  41. OrderNo string `json:"orderNo"`
  42. }
  43. func (r *ScanIntoReqVO) Validate() error {
  44. return validation.ValidateStruct(r, validation.Field(&r.OrderNo, validation.Required))
  45. }
  46. type SignReceiptRespVO struct {
  47. OrderId int `json:"orderId"`
  48. SingTime models.MyTime `json:"singTime"`
  49. }