Loading...
Also, users would want immediate updates about the slots that were booked or not, and not till they reach the payment section.
Tables involved:
Slot:
id: int, PK
slotId: int, unique key, indexed
vehicleId: string | null, nullable
vehicleType: string (enum) (ex: 4 wheeler, 2 wheeler)
duration: float | null
isBooked: boolean
isReserved: boolean
check_in: timestamp
Vehicle:
id: int, PK
vehicleId: string, not null, indexed
vehicleType: string(enum)
slotId: slotId, FK from Slot
check_in: timestamp
check_out: timestamp | null
User:
id: int, PK
userId: string
vehicleId: string unique key on userId + vehicleId
phone: string
Audit: (insert only)
id: int, PK
operation: enum ( Create, Update, Delete)
slot: slotId (FK with slots table id)
userid: FK with users table userId
created_at: Timestamp
Working of Payment Service:
Cache:
Furthur enhancements: