param.go 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. package model
  2. // ParamID ID类型请求
  3. type ParamID struct {
  4. ID int64 `form:"id" validate:"gt=0,required"`
  5. }
  6. // ParamCards 卡片类型请求
  7. type ParamCards struct {
  8. IDs string `form:"ids" validate:"gt=0,required"`
  9. }
  10. // ParamBill 项目订单信息请求
  11. type ParamBill struct {
  12. IDs string `form:"ids" validate:"gt=0,required"`
  13. Sids string `form:"sids"`
  14. Tids string `form:"tids"`
  15. }
  16. // GuestParam 嘉宾参数
  17. type GuestParam struct {
  18. ID uint32 `form:"id"`
  19. Name string `form:"name" validate:"required"`
  20. GuestImg string `form:"guestimg" validate:"required"`
  21. Description string `form:"description"`
  22. GuestID int64 `form:"guestid"`
  23. }
  24. // GuestStatusParam 嘉宾状态
  25. type GuestStatusParam struct {
  26. ID int64 `form:"id" validate:"required"`
  27. Status int8 `form:"status"`
  28. }
  29. // GuestSearchParam 嘉宾搜索
  30. type GuestSearchParam struct {
  31. Keyword string `form:"keyword"`
  32. Ps int `form:"ps"`
  33. Pn int `form:"pn"`
  34. }
  35. // VenueSearchParam 场馆搜索参数
  36. type VenueSearchParam struct {
  37. PageParam
  38. ProvinceID int `form:"province_id"`
  39. CityID int `form:"city_id"`
  40. ID int `form:"id"`
  41. Name string `form:"name"`
  42. }
  43. // VersionSearchParam 版本搜索参数
  44. type VersionSearchParam struct {
  45. Type int `form:"type"`
  46. TargetItem int `form:"target_item"`
  47. ItemName string `form:"item_name"`
  48. Status []int `form:"status"`
  49. PageParam
  50. }
  51. // PageParam 分页参数
  52. type PageParam struct {
  53. Pn int `form:"pn" validate:"min=1,gte=1"`
  54. Ps int `form:"ps" validate:"min=1,max=10000"`
  55. }
  56. // AreaInfoParam areaInfo接口请求
  57. type AreaInfoParam struct {
  58. ID int64 `form:"id" validate:"min=0"` // 待修改区域的ID(为0表示创建)
  59. AID string `form:"a_id" validate:"min=1,max=16"` // 区域自定义编号
  60. Name string `form:"name" validate:"min=1,max=16"` // 区域名
  61. Place int64 `form:"place" validate:"min=1"` // 所属场地ID
  62. Coordinate string `form:"coordinate" validate:"min=1"` // 区域坐标
  63. }
  64. // PlaceInfoParam placeInfo接口请求
  65. type PlaceInfoParam struct {
  66. ID int64 `form:"id" validate:"min=0"` // 待修改场地的ID(为0表示创建)
  67. Status int32 `form:"status" validate:"min=0,max=1"` // 状态
  68. Name string `form:"name" validate:"max=16"` // 场地名
  69. BasePic string `form:"base_pic" validate:"max=128"` // 场地底图
  70. Venue int64 `form:"venue" validate:"min=1"` // 场馆ID
  71. DWidth int32 `form:"d_width" validate:"min=0"` // mis画框宽度
  72. DHeight int32 `form:"d_height" validate:"min=0"` // mis画框高度
  73. }
  74. // SeatInfoParam seatInfo接口请求
  75. type SeatInfoParam struct {
  76. Area int64 `form:"area" validate:"min=1"` // 区域ID
  77. SeatsNum int32 `form:"seats_num" validate:"min=0"` // 座位数
  78. SeatMap string `form:"seat_map" validate:"min=1"` // 座位图
  79. Seats string `form:"seats"` // 座位数组JSON
  80. Width int32 `form:"width" validate:"min=1"` // 坐区宽度
  81. Height int32 `form:"height" validate:"min=1"` // 坐区高度
  82. RowList string `form:"row_list" validate:"min=1"` // 行号序列
  83. SeatStart string `form:"seat_start" validate:"min=1"` // 座位起始坐标
  84. }
  85. // SeatStockParam seatStock接口请求
  86. type SeatStockParam struct {
  87. Screen int64 `form:"screen" validate:"min=1"` // 场次ID
  88. Area int64 `form:"area" validate:"min=1"` // 区域ID
  89. SeatInfo string `form:"seat_info"` // 座位票种定义数组JSON
  90. }
  91. // RemoveSeatOrdersParam removeSeatOrders接口请求
  92. type RemoveSeatOrdersParam struct {
  93. Price int64 `form:"price" validate:"min=1"` // 票价ID
  94. }
  95. // VenueInfoParam venueInfo接口请求
  96. type VenueInfoParam struct {
  97. ID int64 `form:"id" validate:"min=0"` // 待修改场馆的ID(为0表示创建)
  98. Name string `form:"name" validate:"max=25"` // 场馆名
  99. Status int32 `form:"status" validate:"min=0,max=1"` // 状态 1-启用 0-停用
  100. Province int64 `form:"provid" validate:"min=0"` // 省份ID
  101. City int64 `form:"cityid" validate:"min=0"` // 城市ID
  102. District int64 `form:"distid" validate:"min=0"` // 区县ID
  103. AddressDetail string `form:"addr" validate:"min=0,max=60"` // 详细地址
  104. Coordinate string `form:"coordinate" validate:"min=0"` // 场馆地图坐标及类型字段
  105. Traffic string `form:"traff" validate:"min=0,max=100"` // 交通信息
  106. }