refunds table
The refunds table in the Airline Reservation Database Schema schema has 9 columns, keyed by id, with 2 foreign keys to payments and tickets.
Refunds act on TICKETS, not on bookings, and record the penalty separately so the fare rule applied stays visible.
Columns (9)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| payment_id | uuid | not null, references payments.id | |
| ticket_id | uuid | references tickets.id | |
| status | refund_status | not null | |
| amount_minor | bigint | not null | |
| penalty_minor | bigint | not null | |
| currency | char(3) | not null | |
| reason | varchar(255) | ||
| processed_at | timestamptz |
Indexes (1)
(payment_id)
Relationships
refunds.payment_idreferencespayments.idrefunds.ticket_idreferencestickets.id