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()
countryCode varchar 100 'ID'::character varying
Countries.code CreditPackages_countryCode_fkey R

Country Code of country that this credit package is available in. Foreign Key Reference Countries.

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_countryCode_idx Must be unique Asc/Asc paidCredits + countryCode

Check Constraints

Constraint Name Constraint
CreditPackages_freeCredits_check ((("freeCredits" IS NULL) OR ("freeCredits" > 0)))
CreditPackages_paidCredits_check (("paidCredits" > 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))))

Relationships