payments table

The payments table in the Hotel Booking Database Schema schema has 9 columns, keyed by id, with 1 foreign key to bookings.

Deposits, balances and refunds are all rows here, separated by type. Never net them into one figure.

Columns (9)

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

Indexes (1)

  • (booking_id, status)

Relationships