Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | uuid | 2147483647 | gen_random_uuid() |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| companyId | uuid | 2147483647 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||
| userId | uuid | 2147483647 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||
| status | "employer_purchases"."enum_employer_purchases_CreditPurchaseOrders_status" | 2147483647 | null |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| redirectPathAfterPayment | text | 2147483647 | √ | null |
|
|
Redirect path for frontend after successful payment and after payment action |
||||||||||||||||||||||||||||||||||||||||||||||
| paidCredits | int4 | 10 | null |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| freeCredits | int4 | 10 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||
| creditTimePeriod | int4 | 10 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||
| creditTimePeriodUnit | "employer_purchases"."enum_employer_purchases_timePeriodUnit" | 2147483647 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||
| pricePerCredit | numeric | 0 | null |
|
|
Represents the cost of one credit in the given currency |
|||||||||||||||||||||||||||||||||||||||||||||||
| currency | "employer_purchases"."enum_employer_purchases_supported_currencies" | 2147483647 | null |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| taxPercentage | numeric | 0 | null |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| createdAt | timestamptz | 35,6 | now() |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| updatedAt | timestamptz | 35,6 | now() |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| countryCode | varchar | 100 | 'ID'::character varying |
|
|
Country Code of country that this credit package is available in. Foreign Key Reference Countries. |
|||||||||||||||||||||||||||||||||||||||||||||||
| purchaseType | "employer_purchases"."enum_employer_purchases_purchaseType" | 2147483647 | 'ONE_TIME'::employer_purchases."enum_employer_purchases_purchaseType" |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| CreditPurchaseOrders_pkey | Primary key | Asc | id |
| CreditPurchaseOrders_companyId_status_idx | Performance | Asc/Asc | companyId + status |
| employer_purchases_CreditPurchaseOrders_companyId_idx | Performance | Asc | companyId |
| employer_purchases_CreditPurchaseOrders_status_idx | Performance | Asc | status |
| employer_purchases_CreditPurchaseOrders_userId_idx | Performance | Asc | userId |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| CreditPurchaseOrders_freeCredits_check | ((("freeCredits" IS NULL) OR ("freeCredits" > 0))) |
| CreditPurchaseOrders_taxPercentage_check | (("taxPercentage" >= (0)::numeric)) |
| CreditPurchaseOrders_paidCredits_check | (("paidCredits" > 0)) |
| CreditPurchaseOrders_pricePerCredit_check | (("pricePerCredit" >= (0)::numeric)) |
| creditTimePeriod_and_creditTimePeriodUnit_check | (((("creditTimePeriod" IS NOT NULL) AND ("creditTimePeriod" > 0) AND ("creditTimePeriodUnit" IS NOT NULL)) OR (("creditTimePeriod" IS NULL) AND ("creditTimePeriodUnit" IS NULL)))) |



