ticket_coupons table
The ticket_coupons table in the Airline Reservation Database Schema schema has 6 columns, keyed by id, with 2 foreign keys to tickets and booking_segments.
One coupon per flown segment, each independently used, refunded or exchanged. This is why a no-show on one leg does not void the rest of the ticket.
Columns (6)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| ticket_id | uuid | not null, references tickets.id | |
| booking_segment_id | uuid | not null, references booking_segments.id | |
| coupon_number | smallint | not null | |
| status | coupon_status | not null | |
| used_at | timestamptz |
Indexes (2)
(ticket_id, coupon_number)unique(booking_segment_id)
Relationships
ticket_coupons.ticket_idreferencestickets.idticket_coupons.booking_segment_idreferencesbooking_segments.id