OrderPayments


Columns

Column Type Size Nulls Auto Default Children Parents Comments
OrderId uuid 2147483647 null
ExpertClassGoogleInAppPayments.orderPaymentOrderId ExpertClassGoogleInAppPayments_orderPaymentOrderId_paymentProvi R
XenditPaymentWebhookLogs.OrderPaymentId XenditPaymentWebhookLogs_OrderPaymentId_fkey R
Orders.id OrderPayments_OrderId_fkey R

Primary key, relating to the primary key of Orders Table.

paymentId varchar 255 null

paymentId provided by a payment provider for the payment.

total numeric 19,4 null

Total order amount after discounts are applied.

currency varchar 3 null

Currency that the payment is made in.

paymentProvider enum_Payment_provider 2147483647 null
ExpertClassGoogleInAppPayments.paymentProvider ExpertClassGoogleInAppPayments_orderPaymentOrderId_paymentProvi R

Name of the paymentProvider.

metadata jsonb 2147483647 null

Meta information about the payment.

createdAt timestamptz 35,6 now()
subtotal numeric 19,4 null

Total order amount before discounts are applied.

Indexes

Constraint Name Type Sort Column(s)
OrderPayments_pkey Primary key Asc OrderId
OrderPayments_OrderId_paymentProvider_key Must be unique Asc/Asc OrderId + paymentProvider
OrderPayments_paymentId_idx Performance Asc paymentId

Check Constraints

Constraint Name Constraint
OrderPayments_amount_check ((total > (0)::numeric))

Relationships