vehicle.go 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. PlateNumber string `json:"plate_number"`
  59. EntryTime int64 `json:"entry_time"`
  60. ExitTime int64 `json:"exit_time"`
  61. StayTime int64 `json:"stay_time"`
  62. Fee float64 `json:"fee"`
  63. ChangeAmount float64 `json:"change_amount"`
  64. PaymentEntry string `json:"payment_entry"`
  65. PaymentMethod string `json:"payment_method"`
  66. EntryChannelID uint `json:"entry_channel_id"`
  67. EntryChannelCode string `json:"entry_channel_code"`
  68. EntryChannelName string `json:"entry_channel_name"`
  69. EntryDeviceCode string `json:"entry_device_code"`
  70. EntryDeviceName string `json:"entry_device_name"`
  71. ExitChannelID uint `json:"exit_channel_id"`
  72. ExitChannelCode string `json:"exit_channel_code"`
  73. ExitChannelName string `json:"exit_channel_name"`
  74. ExitDeviceCode string `json:"exit_device_code"`
  75. ExitDeviceName string `json:"exit_device_name"`
  76. }