payments table
The payments table in the Airline Reservation Database Schema schema has 9 columns, keyed by id, with 1 foreign key to bookings. 1 column in refunds references it.
miles_redeemed sits beside the cash amount because award and cash-plus-points bookings are the same transaction shape.
Columns (9)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| booking_id | uuid | not null, references bookings.id | |
| method | payment_method | not null | |
| status | payment_status | not null | |
| amount_minor | bigint | not null | |
| currency | char(3) | not null | |
| miles_redeemed | integer | ||
| processor_reference | varchar(120) | unique | |
| paid_at | timestamptz |
Indexes (1)
(booking_id, status)
Relationships
payments.booking_idreferencesbookings.idrefunds.payment_idreferencespayments