Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | uuid | 2147483647 | gen_random_uuid() |
|
|
|||||||||||||||||||||
| companyId | uuid | 2147483647 | √ | null |
|
|
Foreign Key to the Companies Table |
|||||||||||||||||||
| creatorUserId | uuid | 2147483647 | null |
|
|
Foreign Key to the Users Table |
||||||||||||||||||||
| expiryDateTime | timestamptz | 35,6 | √ | null |
|
|
Subscription end date for company |
|||||||||||||||||||
| concurrentJobSlots | int4 | 10 | null |
|
|
The number of job slots that company can use under subscription mode |
||||||||||||||||||||
| createdAt | timestamptz | 35,6 | now() |
|
|
|||||||||||||||||||||
| notes | text | 2147483647 | √ | null |
|
|
This column will be used to describe the purpose of job slots subscription |
|||||||||||||||||||
| status | "employer_commerce"."enum_CompanyJobSlotsSubscription_status" | 2147483647 | null |
|
|
|||||||||||||||||||||
| updatedAt | timestamptz | 35,6 | now() |
|
|
|||||||||||||||||||||
| price | numeric | 0 | √ | null |
|
|
The price of the job slots subscription before tax |
|||||||||||||||||||
| invoiceId | text | 2147483647 | √ | null |
|
|
This invoice id will be used for job slots subscription payment |
|||||||||||||||||||
| planType | "employer_commerce"."enum_SubscriptionPlan_types" | 2147483647 | null |
|
|
The plan type chosen from list of subscription plans. defaultPrice of planType and final price of plan in CompanyJobSlotsSubscriptions can be different due to negotiations. |
||||||||||||||||||||
| currencyCode | "employer_commerce"."enum_EmployerCommerce_Currency" | 2147483647 | √ | null |
|
|
ISO 4217 Currency code e.g. IDR etc. |
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| CompanyJobSlotsSubscriptions_pkey | Primary key | Asc | id |
| employer_commerce_CompanyJobSlotsSubscriptions_active_status_fo | Must be unique | Asc/Asc | companyId + status |
| employer_commerce_CompanyJobSlotsSubscriptions_companyId_idx | Performance | Asc | companyId |
| employer_commerce_CompanyJobSlotsSubscriptions_concurrentJobSlo | Performance | Asc | concurrentJobSlots |
| employer_commerce_CompanyJobSlotsSubscriptions_createdAt_idx | Performance | Asc | createdAt |
| employer_commerce_CompanyJobSlotsSubscriptions_creatorUserId_id | Performance | Asc | creatorUserId |
| employer_commerce_CompanyJobSlotsSubscriptions_expiryDateTime_i | Performance | Asc | expiryDateTime |
| employer_commerce_CompanyJobSlotsSubscriptions_invoiceId_idx | Performance | Asc | invoiceId |
| employer_commerce_CompanyJobSlotsSubscriptions_notes_idx | Performance | Asc | notes |
| employer_commerce_CompanyJobSlotsSubscriptions_planType_idx | Performance | Asc | planType |
| employer_commerce_CompanyJobSlotsSubscriptions_price_idx | Performance | Asc | price |
| employer_commerce_CompanyJobSlotsSubscriptions_status_idx | Performance | Asc | status |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| price | ((((price IS NOT NULL) AND (price > (0)::numeric)) OR (price IS NULL))) |

