vehicle.go 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. TriggerMode string `json:"-"`
  53. }
  54. // VehicleIdentityRequest 用车牌或 RFID 定位当前车辆及停车会话。
  55. type VehicleIdentityRequest struct {
  56. PlateNumber string `json:"plate_number"`
  57. RFIDTag string `json:"rfid_tag"`
  58. }
  59. // ExitPreviewRequest 支持通过会话编号或车辆身份预览出场结算信息。
  60. type ExitPreviewRequest struct {
  61. SessionID uint `json:"session_id"`
  62. PlateNumber string `json:"plate_number"`
  63. RFIDTag string `json:"rfid_tag"`
  64. }
  65. type VehicleEntryResponse struct {
  66. Success bool `json:"success"`
  67. Message string `json:"message"`
  68. Data struct {
  69. SessionID uint `json:"session_id"`
  70. TicketID uint `json:"ticket_id"`
  71. TicketNo string `json:"ticket_no"`
  72. PlateNumber string `json:"plate_number"`
  73. EntryTime int64 `json:"entry_time"`
  74. ParkingLotID uint `json:"parking_lot_id"`
  75. ParkingSpaceID uint `json:"parking_space_id"`
  76. EntryChannelID uint `json:"entry_channel_id"`
  77. EntryChannelCode string `json:"entry_channel_code"`
  78. EntryChannelName string `json:"entry_channel_name"`
  79. EntryDeviceCode string `json:"entry_device_code"`
  80. EntryDeviceName string `json:"entry_device_name"`
  81. } `json:"data"`
  82. }
  83. type VehicleRecordRequest struct {
  84. PlateNumber string `form:"plate_number" json:"plate_number"`
  85. RFIDTag string `form:"rfid_tag" json:"rfid_tag"`
  86. Page int `form:"page,default=1" json:"page"`
  87. PageSize int `form:"page_size,default=10" json:"page_size"`
  88. }
  89. type ExitConfirmRequest struct {
  90. SessionID uint `json:"session_id"`
  91. TicketNo string `json:"ticket_no"`
  92. PlateNumber string `json:"plate_number"`
  93. RFIDTag string `json:"rfid_tag"`
  94. PaymentEntry string `json:"payment_entry"`
  95. PaymentMethod string `json:"payment_method"`
  96. PaidAmount float64 `json:"paid_amount"`
  97. ExitChannelID uint `json:"exit_channel_id"`
  98. ExitChannelCode string `json:"exit_channel_code"`
  99. ExitChannelName string `json:"exit_channel_name"`
  100. ExitDeviceCode string `json:"exit_device_code"`
  101. ExitDeviceName string `json:"exit_device_name"`
  102. }