Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| id | uuid | 2147483647 | gen_random_uuid() |
|
|
||||||
| orderPaymentOrderId | uuid | 2147483647 | null |
|
|
||||||
| expertClassInAppProductId | varchar | 140 | null |
|
|
Foreign key to ExpertClassInAppProducts table |
|||||
| googlePlayOrderId | text | 2147483647 | null |
|
|
Order id created by google play for every new financial transaction |
|||||
| purchaseToken | text | 2147483647 | null |
|
|
Google Play Billing purchaseToken |
|||||
| paymentProvider | enum_Payment_provider | 2147483647 | 'GOOGLE_PLAY'::"enum_Payment_provider" |
|
|
Part of composite foreign key that stores a constant enum GOOGLE_PLAY. To help data consistency and prevent dirty data in parent table paymentProvider column. |
|||||
| createdAt | timestamptz | 35,6 | now() |
|
|
||||||
| updatedAt | timestamptz | 35,6 | now() |
|
|
||||||
| paidAt | timestamptz | 35,6 | √ | null |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| ExpertClassGoogleInAppPayments_pkey | Primary key | Asc | id |
| ExpertClassGoogleInAppPayments_expertClassInAppProductId_idx | Performance | Asc | expertClassInAppProductId |
| ExpertClassGoogleInAppPayments_googlePlayOrderId_key | Must be unique | Asc | googlePlayOrderId |
| ExpertClassGoogleInAppPayments_orderPaymentOrderId_key | Must be unique | Asc | orderPaymentOrderId |
| ExpertClassGoogleInAppPayments_orderPaymentOrderId_paymentProvi | Must be unique | Asc/Asc | orderPaymentOrderId + paymentProvider |
| ExpertClassGoogleInAppPayments_purchaseToken_key | Must be unique | Asc | purchaseToken |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| ExpertClassGoogleInAppPayments_paymentProvider_check | (("paymentProvider" = 'GOOGLE_PLAY'::"enum_Payment_provider")) |

