CompanyProductInventories


Columns

Column Type Size Nulls Auto Default Children Parents Comments
companyId uuid 2147483647 null
Companies.id CompanyProductInventories_companyId_fkey C
productId uuid 2147483647 null
Products.id CompanyProductInventories_productId_fkey R
amount int4 10 null

Represents current balance from a company for a particular product

createdAt timestamptz 35,6 now()
updatedAt timestamptz 35,6 now()
expiryDateTime timestamptz 35,6 null

Represents the end date of a company product balance

trialInformation jsonb 2147483647 null
daysBeforeExpiryReminder int4 10 null

Indexes

Constraint Name Type Sort Column(s)
CompanyProductInventories_pkey Primary key Asc/Asc companyId + productId
CompanyProductInventories_productId_expiryDateTime_companyId_id Performance Asc/Asc/Asc productId + expiryDateTime + companyId

Check Constraints

Constraint Name Constraint
CompanyProductInventories_amount_check (((amount)::numeric >= (0)::numeric))
CompanyProductInventories_daysBeforeExpiryReminder_check ((("daysBeforeExpiryReminder" IS NULL) OR ("daysBeforeExpiryReminder" > 0)))

Relationships