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)

Columns of the payments table
ColumnTypeConstraintsDescription
iduuidprimary key
booking_iduuidnot null, references bookings.id
methodpayment_methodnot null
statuspayment_statusnot null
amount_minorbigintnot null
currencychar(3)not null
miles_redeemedinteger
processor_referencevarchar(120)unique
paid_attimestamptz

Indexes (1)

  • (booking_id, status)

Relationships