Skip to content

parking_ticket

Module: Parking Ticket.

ParkingTicket

Bases: BaseModel

Class: Parking Ticket.

Source code in parking_lot/src/parking_ticket.py
19
20
21
22
23
24
25
26
27
28
29
30
31
32
class ParkingTicket(BaseModel):
    """Class: Parking Ticket."""

    ticket_id: UUID = uuid4()
    entrance_id: int
    spot_id: int
    spot_type: ParkingSpotType
    vehicle_id: int
    vehicle_type: vehicle.VehicleType
    issued_at: datetime
    paid_at: datetime | None
    exit_id: int | None
    status: ParkingTicketStatus
    paid_amount: float | None

ParkingTicketStatus

Bases: Enum

Enum: ParkingTicketStatus.

Source code in parking_lot/src/parking_ticket.py
11
12
13
14
15
16
class ParkingTicketStatus(Enum):
    """Enum: ParkingTicketStatus."""

    UNPAID = "unpaid"
    PAID = "paid"
    LOST = "lost"