Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | uuid | 2147483647 | gen_random_uuid() |
|
|
|||||||||
| jobId | uuid | 2147483647 | null |
|
|
|||||||||
| productId | uuid | 2147483647 | null |
|
|
|||||||||
| logType | "employer_purchases"."enum_employer_purchases_JobProductInventoryLogs_type" | 2147483647 | null |
|
|
|||||||||
| amount | int4 | 10 | null |
|
|
Represents the amount added/used for a particular product |
||||||||
| finalBalance | int4 | 10 | null |
|
|
Represents the balance after the job product operation is done |
||||||||
| createdAt | timestamptz | 35,6 | now() |
|
|
|||||||||
| logTypeNew | "employer_purchases"."enum_employer_purchases_JobProductInventoryLogs_type" | 2147483647 | 'USAGE_FROM_BALANCE'::employer_purchases."enum_employer_purchases_JobProductInventoryLogs_type" |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| JobProductInventoryLogs_pkey | Primary key | Asc | id |
| JobProductInventoryLogs_jobId_logType_idx | Performance | Asc/Asc | jobId + logType |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| JobProductInventoryLogs_finalBalance_check | (("finalBalance" >= 0)) |
| JobProductInventoryLogs_amount_check | ((amount >= 0)) |

