vehicle.go 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. package request
  2. type VehicleCreate struct {
  3. PlateNumber string `json:"plate_number"`
  4. VehicleTypeID uint `json:"vehicle_type_id"`
  5. VehicleBrand string `json:"vehicle_brand"`
  6. VehicleColor string `json:"vehicle_color"`
  7. RFIDTag string `json:"rfid_tag"`
  8. OwnerId uint `json:"owner_id"`
  9. }
  10. type VehicleUpdate struct {
  11. ID uint `json:"id"`
  12. PlateNumber string `json:"plate_number"`
  13. VehicleTypeID uint `json:"vehicle_type_id"`
  14. VehicleBrand string `json:"vehicle_brand"`
  15. VehicleColor string `json:"vehicle_color"`
  16. RFIDTag string `json:"rfid_tag"`
  17. OwnerId uint `json:"owner_id"`
  18. }
  19. type VehicleQuery struct {
  20. PlateNumber string `form:"plate_number"`
  21. VehicleTypeID uint `form:"vehicle_type_id"`
  22. OwnerId uint `form:"owner_id"`
  23. Page int `form:"page,default=1"`
  24. PageSize int `form:"page_size,default=10"`
  25. RfidTag string `gorm:"column:rfid_tag" json:"rfid_tag"`
  26. }
  27. type VehicleTypeCreate struct {
  28. Name string `json:"name"`
  29. Remarks string `json:"remarks"`
  30. }
  31. type VehicleTypeUpdate struct {
  32. ID uint `json:"id"`
  33. Name string `json:"name"`
  34. Remarks string `json:"remarks"`
  35. }
  36. type VehicleTypeQuery struct {
  37. Name string `json:"name" form:"name"`
  38. Page int `json:"page,default=1" form:"page"`
  39. PageSize int `json:"pageSize,default=1" form:"pageSize"`
  40. }
  41. type VehicleEntry struct {
  42. PlateNumber string `json:"plate_number"`
  43. ParkingLotID uint `json:"parking_lot_id"`
  44. ParkingSpaceID uint `json:"parking_space_id"`
  45. RFIDTag string `json:"rfid_tag"`
  46. EntryImage string `json:"entry_image"`
  47. EntryChannelID uint `json:"entry_channel_id"`
  48. EntryChannelCode string `json:"entry_channel_code"`
  49. EntryChannelName string `json:"entry_channel_name"`
  50. EntryDeviceCode string `json:"entry_device_code"`
  51. EntryDeviceName string `json:"entry_device_name"`
  52. }
  53. // VehicleIdentityRequest 用车牌或 RFID 定位当前车辆及停车会话。
  54. type VehicleIdentityRequest struct {
  55. PlateNumber string `json:"plate_number"`
  56. RFIDTag string `json:"rfid_tag"`
  57. }
  58. // ExitPreviewRequest 支持通过会话编号或车辆身份预览出场结算信息。
  59. type ExitPreviewRequest struct {
  60. SessionID uint `json:"session_id"`
  61. PlateNumber string `json:"plate_number"`
  62. RFIDTag string `json:"rfid_tag"`
  63. }
  64. type VehicleEntryResponse struct {
  65. Success bool `json:"success"`
  66. Message string `json:"message"`
  67. Data struct {
  68. PlateNumber string `json:"plate_number"`
  69. EntryTime int64 `json:"entry_time"`
  70. ParkingLotID uint `json:"parking_lot_id"`
  71. ParkingSpaceID uint `json:"parking_space_id"`
  72. EntryChannelID uint `json:"entry_channel_id"`
  73. EntryChannelCode string `json:"entry_channel_code"`
  74. EntryChannelName string `json:"entry_channel_name"`
  75. EntryDeviceCode string `json:"entry_device_code"`
  76. EntryDeviceName string `json:"entry_device_name"`
  77. } `json:"data"`
  78. }
  79. type VehicleRecordRequest struct {
  80. PlateNumber string `form:"plate_number" json:"plate_number"`
  81. RFIDTag string `form:"rfid_tag" json:"rfid_tag"`
  82. Page int `form:"page,default=1" json:"page"`
  83. PageSize int `form:"page_size,default=10" json:"page_size"`
  84. }
  85. type ExitConfirmRequest struct {
  86. SessionID uint `json:"session_id"`
  87. TicketNo string `json:"ticket_no"`
  88. PlateNumber string `json:"plate_number"`
  89. RFIDTag string `json:"rfid_tag"`
  90. PaymentEntry string `json:"payment_entry"`
  91. PaymentMethod string `json:"payment_method"`
  92. PaidAmount float64 `json:"paid_amount"`
  93. ExitChannelID uint `json:"exit_channel_id"`
  94. ExitChannelCode string `json:"exit_channel_code"`
  95. ExitChannelName string `json:"exit_channel_name"`
  96. ExitDeviceCode string `json:"exit_device_code"`
  97. ExitDeviceName string `json:"exit_device_name"`
  98. }