vehicle.go 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. package response
  2. import "wails-app/internal/dao"
  3. type Vehicle struct {
  4. dao.Vehicle
  5. }
  6. type VehicleList struct {
  7. Total int64 `json:"total"`
  8. List []dao.Vehicle `json:"list"`
  9. }
  10. type VehicleRecord struct {
  11. dao.VehicleRecord
  12. }
  13. type VehicleRecordList struct {
  14. Total int64 `json:"total"`
  15. List []dao.VehicleRecord `json:"list"`
  16. }
  17. type FeeConfig struct {
  18. dao.FeeConfig
  19. }
  20. type FeeConfigList struct {
  21. Total int64 `json:"total"`
  22. List []dao.FeeConfig `json:"list"`
  23. }
  24. type ExitPreviewResponse struct {
  25. SessionID uint `json:"session_id"`
  26. TicketNo string `json:"ticket_no"`
  27. TicketState string `json:"ticket_state"`
  28. PlateNumber string `json:"plate_number"`
  29. RFIDTag string `json:"rfid_tag"`
  30. EntryTime int64 `json:"entry_time"`
  31. StayTime int64 `json:"stay_time"`
  32. Fee float64 `json:"fee"`
  33. PaidAmount float64 `json:"paid_amount"`
  34. PaymentStatus string `json:"payment_status"`
  35. PaymentEntry string `json:"payment_entry"`
  36. PaymentMethod string `json:"payment_method"`
  37. ParkingLotID uint `json:"parking_lot_id"`
  38. EntryImage string `json:"entry_image"`
  39. EntryChannelID uint `json:"entry_channel_id"`
  40. EntryChannelCode string `json:"entry_channel_code"`
  41. EntryChannelName string `json:"entry_channel_name"`
  42. EntryDeviceCode string `json:"entry_device_code"`
  43. EntryDeviceName string `json:"entry_device_name"`
  44. VehicleType string `json:"vehicle_type"`
  45. IsTemp bool `json:"is_temp"`
  46. // 缴费后免费离场时限(票已支付且超时时有效)
  47. Overtime bool `json:"overtime"` // 是否超过免费离场时限
  48. OvertimeFee float64 `json:"overtime_fee"` // 超时后按当前时长重算的总费用
  49. OvertimeDiff float64 `json:"overtime_diff"` // 需补缴差额(总费用 - 已付)
  50. }
  51. type OperationContextResponse struct {
  52. Action string `json:"action"`
  53. VehicleFound bool `json:"vehicle_found"`
  54. Vehicle *dao.Vehicle `json:"vehicle,omitempty"`
  55. Exit *ExitPreviewResponse `json:"exit,omitempty"`
  56. }
  57. type ExitConfirmResponse struct {
  58. SessionID uint `json:"session_id"`
  59. PlateNumber string `json:"plate_number"`
  60. EntryTime int64 `json:"entry_time"`
  61. ExitTime int64 `json:"exit_time"`
  62. StayTime int64 `json:"stay_time"`
  63. Fee float64 `json:"fee"`
  64. ChangeAmount float64 `json:"change_amount"`
  65. PaymentEntry string `json:"payment_entry"`
  66. PaymentMethod string `json:"payment_method"`
  67. EntryChannelID uint `json:"entry_channel_id"`
  68. EntryChannelCode string `json:"entry_channel_code"`
  69. EntryChannelName string `json:"entry_channel_name"`
  70. EntryDeviceCode string `json:"entry_device_code"`
  71. EntryDeviceName string `json:"entry_device_name"`
  72. ExitChannelID uint `json:"exit_channel_id"`
  73. ExitChannelCode string `json:"exit_channel_code"`
  74. ExitChannelName string `json:"exit_channel_name"`
  75. ExitDeviceCode string `json:"exit_device_code"`
  76. ExitDeviceName string `json:"exit_device_name"`
  77. }