package request

type VehicleCreate struct {
	PlateNumber   string `json:"plate_number"`
	VehicleTypeID uint   `json:"vehicle_type_id"`
	VehicleBrand  string `json:"vehicle_brand"`
	VehicleColor  string `json:"vehicle_color"`
	RFIDTag       string `json:"rfid_tag"`
	OwnerId       uint   `json:"owner_id"`
}

type VehicleUpdate struct {
	ID            uint   `json:"id"`
	PlateNumber   string `json:"plate_number"`
	VehicleTypeID uint   `json:"vehicle_type_id"`
	VehicleBrand  string `json:"vehicle_brand"`
	VehicleColor  string `json:"vehicle_color"`
	RFIDTag       string `json:"rfid_tag"`
	OwnerId       uint   `json:"owner_id"`
}

type VehicleQuery struct {
	PlateNumber   string `form:"plate_number"`
	VehicleTypeID uint   `form:"vehicle_type_id"`
	OwnerId       uint   `form:"owner_id"`
	Page          int    `form:"page,default=1"`
	PageSize      int    `form:"page_size,default=10"`
	RfidTag       string `gorm:"column:rfid_tag" json:"rfid_tag"`
}

type VehicleTypeCreate struct {
	Name    string `json:"name"`
	Remarks string `json:"remarks"`
}

type VehicleTypeUpdate struct {
	ID      uint   `json:"id"`
	Name    string `json:"name"`
	Remarks string `json:"remarks"`
}

type VehicleTypeQuery struct {
	Name     string `json:"name" form:"name"`
	Page     int    `json:"page,default=1" form:"page"`
	PageSize int    `json:"pageSize,default=1" form:"pageSize"`
}

type VehicleEntry struct {
	PlateNumber    string `json:"plate_number"`
	ParkingLotID   uint   `json:"parking_lot_id"`
	ParkingSpaceID uint   `json:"parking_space_id"`
	RFIDTag        string `json:"rfid_tag"`
	EntryImage     string `json:"entry_image"`
}

type VehicleExit struct {
	PlateNumber string `json:"plate_number"`
	ExitImage   string `json:"exit_image"`
	RFIDTag     string `json:"rfid_tag"`
}

type VehicleEntryResponse struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
	Data    struct {
		PlateNumber    string `json:"plate_number"`
		EntryTime      int64  `json:"entry_time"`
		ParkingLotID   uint   `json:"parking_lot_id"`
		ParkingSpaceID uint   `json:"parking_space_id"`
	} `json:"data"`
}

type VehicleExitResponse struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
	Data    struct {
		PlateNumber   string  `json:"plate_number"`
		EntryTime     int64   `json:"entry_time"`
		ExitTime      int64   `json:"exit_time"`
		StayTime      int64   `json:"stay_time"`
		Fee           float64 `json:"fee"`
		PaymentStatus string  `json:"payment_status"`
	} `json:"data"`
}

type VehicleRecordRequest struct {
	PlateNumber string `form:"plate_number" json:"plate_number"`
	RFIDTag     string `form:"rfid_tag" json:"rfid_tag"`
	Page        int    `form:"page,default=1" json:"page"`
	PageSize    int    `form:"page_size,default=10" json:"page_size"`
}

type ExitConfirmRequest struct {
	PlateNumber   string  `json:"plate_number"`
	RFIDTag       string  `json:"rfid_tag"`
	PaymentMethod string  `json:"payment_method"`
	PaidAmount    float64 `json:"paid_amount"`
}
