vehicle.go 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. package v1
  2. import (
  3. "property-system-gateway/param/base"
  4. "property-system-gateway/pb/v1"
  5. )
  6. type VehicleAddBody struct {
  7. // 车位id
  8. SpaceId int64 `form:"spaceId" json:"space_id"`
  9. // 车牌号
  10. PlateNo string `form:"plateNo" json:"plate_no"`
  11. // 1 小型车 2 大型车 3 新能源小车 4 新能源大车
  12. VehicleType int32 `form:"vehicle_type" json:"vehicle_type"`
  13. // 车架号
  14. Vin string `form:"vin" json:"vin"`
  15. // 发动机号
  16. EngineNo string `form:"engine_no" json:"engine_no"`
  17. // 品牌
  18. Brand string `form:"brand" json:"brand"`
  19. // 颜色
  20. Color string `form:"color" json:"color"`
  21. // 住户uid
  22. HouseholdUid int64 `form:"household_uid" json:"household_uid"`
  23. // 1 出租 2 出售
  24. BindType int32 `form:"bind_type" json:"bind_type"`
  25. // 排量单位
  26. DisplacementUnit string `form:"displacement_unit" json:"displacement_unit"`
  27. // 排量
  28. Displacement float64 `form:"displacement" json:"displacement"`
  29. // 座位数
  30. Seat int32 `form:"seat" json:"seat"`
  31. }
  32. type VehicleAddRequest struct {
  33. base.Header
  34. VehicleAddBody
  35. }
  36. type VehicleAddResponse struct {
  37. base.Result
  38. Data v1.VehicleAddReply `json:"data"`
  39. }
  40. type VehicleUpdateBody struct {
  41. // 车位id
  42. SpaceId int64 `form:"spaceId" json:"space_id"`
  43. // 车牌号
  44. PlateNo string `form:"plateNo" json:"plate_no"`
  45. // 1 小型车 2 大型车 3 新能源小车 4 新能源大车
  46. VehicleType int32 `form:"vehicle_type" json:"vehicle_type"`
  47. // 车架号
  48. Vin string `form:"vin" json:"vin"`
  49. // 发动机号
  50. EngineNo string `form:"engine_no" json:"engine_no"`
  51. // 品牌
  52. Brand string `form:"brand" json:"brand"`
  53. // 颜色
  54. Color string `form:"color" json:"color"`
  55. // 住户uid
  56. HouseholdUid int64 `form:"household_uid" json:"household_uid"`
  57. // 1 出租 2 出售
  58. BindType int32 `form:"bind_type" json:"bind_type"`
  59. // 排量单位
  60. DisplacementUnit string `form:"displacement_unit" json:"displacement_unit"`
  61. // 排量
  62. Displacement float64 `form:"displacement" json:"displacement"`
  63. // 座位数
  64. Seat int32 `form:"seat" json:"seat"`
  65. Id int64 `form:"id"`
  66. }
  67. type VehicleUpdateRequest struct {
  68. base.Header
  69. VehicleUpdateBody
  70. }
  71. type VehicleUpdateResponse struct {
  72. base.Result
  73. }
  74. type VehicleDelQuery struct {
  75. Id int64 `form:"id"`
  76. }
  77. type VehicleDelRequest struct {
  78. base.Header
  79. VehicleDelQuery
  80. }
  81. type VehicleDelResponse struct {
  82. base.Result
  83. }
  84. type VehicleListQuery struct {
  85. Page int64 `form:"page" json:"page"`
  86. PageSize int64 `form:"page_size" json:"page_size"`
  87. HouseholdUid int64 `form:"household_uid" json:"household_uid"`
  88. PlateNo string `form:"plate_no" json:"plate_no"`
  89. }
  90. type VehicleListRequest struct {
  91. base.Header
  92. VehicleListQuery
  93. }
  94. type VehicleListResponse struct {
  95. base.Result
  96. Data v1.VehicleListReply `json:"data"`
  97. }
  98. type VehicleBrandListRequest struct {
  99. base.Header
  100. }
  101. type VehicleBrandItem struct {
  102. Brand string `json:"brand"`
  103. BrandPic string `json:"brand_pic"`
  104. }
  105. type VehicleBrandData struct {
  106. List []VehicleBrandItem `json:"list"`
  107. }
  108. type VehicleBrandListResponse struct {
  109. base.Result
  110. Data VehicleBrandData `json:"data"`
  111. }