CreditPackages


Columns

Column Type Size Nulls Auto Default Children Parents Comments
paidCredits int4 10 null
freeCredits int4 10 null
timePeriod int4 10 null
timePeriodUnit "employer_purchases"."enum_employer_purchases_timePeriodUnit" 2147483647 null
createdAt timestamptz 35,6 now()
updatedAt timestamptz 35,6 now()
id uuid 2147483647 gen_random_uuid()
InAppProductPackageMappings.creditPackageId InAppProductPackageMappings_creditPackageId_fkey R

Indexes

Constraint Name Type Sort Column(s)
CreditPackages_pkey Primary key Asc id
CreditPackages_paidCredits_idx Must be unique Asc paidCredits

Check Constraints

Constraint Name Constraint
CreditPackages_freeCredits_check ((("freeCredits" IS NULL) OR ("freeCredits" > 0)))
timePeriod_and_timePeriodUnit_check (((("timePeriod" IS NOT NULL) AND ("timePeriod" > 0) AND ("timePeriodUnit" IS NOT NULL)) OR (("timePeriod" IS NULL) AND ("timePeriodUnit" IS NULL))))
CreditPackages_paidCredits_check (("paidCredits" > 0))

Relationships