resouce.go 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. package model
  2. import "go-common/library/time"
  3. // ResourceCode .
  4. type ResourceCode struct {
  5. ID int64 `json:"id"`
  6. BatchCodeID int64 `json:"batch_code_id"`
  7. Status int8 `json:"status"`
  8. Code string `json:"code"`
  9. Mid int64 `json:"mid"`
  10. UseTime time.Time `json:"use_time"`
  11. Ctime time.Time `json:"ctime"`
  12. }
  13. // BatchCode .
  14. type BatchCode struct {
  15. ID int64 `json:"id" form:"id"`
  16. BusinessID int64 `json:"business_id" form:"business_id" validate:"required"`
  17. PoolID int64 `json:"pool_id" form:"pool_id" validate:"required"`
  18. Status int8 `json:"status" `
  19. Type int8 `json:"type" form:"type"`
  20. BatchName string `json:"batch_name" form:"batch_name" validate:"required"`
  21. MaxCount int64 `json:"max_count" form:"max_count"`
  22. LimitDay int64 `json:"limit_day" form:"limit_day" validate:"max=10000,min=-1"`
  23. Reason string `json:"reason" form:"reason" validate:"required"`
  24. Unit int32 `json:"unit" form:"unit" validate:"required"`
  25. Count int64 `json:"count" form:"count" validate:"required"`
  26. SurplusCount int64 `json:"surplus_count"`
  27. Price float64 `json:"price" form:"price" validate:"required"`
  28. StartTime time.Time `json:"start_time" form:"start_time" validate:"required"`
  29. EndTime time.Time `json:"end_time" form:"end_time" validate:"required"`
  30. Contacts string `json:"contacts" form:"contacts"`
  31. ContactsNumber string `json:"contacts_number" form:"contacts_number"`
  32. Operator string `json:"operator"`
  33. Ctime time.Time `json:"ctime"`
  34. }
  35. // CodeVo .
  36. type CodeVo struct {
  37. ResourceCode
  38. BatchName string `json:"batch_name"`
  39. BatchStatus int8 `json:"batch_status"`
  40. StartTime time.Time `json:"start_time"`
  41. EndTime time.Time `json:"end_time"`
  42. Unit int32 `json:"unit"`
  43. }