Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | uuid | 2147483647 | gen_random_uuid() |
|
|
|||||||||||||||
| purchaseOrderId | uuid | 2147483647 | null |
|
|
|||||||||||||||
| productId | uuid | 2147483647 | null |
|
|
|||||||||||||||
| quantity | int4 | 10 | null |
|
|
|||||||||||||||
| createdAt | timestamptz | 35,6 | now() |
|
|
|||||||||||||||
| updatedAt | timestamptz | 35,6 | now() |
|
|
|||||||||||||||
| timePeriod | int4 | 10 | √ | null |
|
|
||||||||||||||
| timePeriodUnit | "employer_purchases"."enum_employer_purchases_timePeriodUnit" | 2147483647 | √ | null |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| PurchaseOrderProducts_pkey | Primary key | Asc | id |
| employer_purchases_PurchaseOrderProducts_productId_idx | Performance | Asc | productId |
| employer_purchases_PurchaseOrderProducts_purchaseOrderId_idx | Performance | Asc | purchaseOrderId |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| timePeriod_and_timePeriodUnit_check | (((("timePeriod" IS NOT NULL) AND ("timePeriod" > 0) AND ("timePeriodUnit" IS NOT NULL)) OR (("timePeriod" IS NULL) AND ("timePeriodUnit" IS NULL)))) |
| PurchaseOrderProducts_quantity_check | ((quantity > 0)) |



