PointsAccounts


Columns

Column Type Size Nulls Auto Default Children Parents Comments
id uuid 2147483647 gen_random_uuid()
EmployerBonusPointsAccounts.pointsAccountId EmployerBonusPointsAccounts_pointsAccountId_fkey R
EmployerPaidPointsAccounts.pointsAccountId EmployerPaidPointsAccounts_pointsAccountId_fkey R
ExpiryPointsAccounts.pointsAccountId ExpiryPointsAccounts_pointsAccountId_fkey R
JobPostExtensionPointsUsageAccounts.pointsAccountId JobPostExtensionPointsUsageAccounts_pointsAccountId_fkey R
JobPostPointsUsageAccounts.pointsAccountId JobPostPointsUsageAccounts_pointsAccountId_fkey R
PointsJournalEntryDebitCredits.pointsAccountId PointsTopUpJournalEntryDebitCredits_pointsAccountId_fkey R
TalentChatPointsAccounts.pointsAccountId TalentChatPointsAccounts_pointsAccountId_fkey R
createdAt timestamptz 35,6 now()
updatedAt timestamptz 35,6 now()
balance numeric 0 null

Contains the current balance of points in the account. It is updated whenever a points journal entry is created.

normalBalance "employer_commerce"."enum_EmployerCommerce_PointsNormalBalanceType" 2147483647 null

If DEBIT, debit will increase balance and credit will decrease balance. If CREDIT, credit to it will increase balance and debit to it will decrease balance. https://en.wikipedia.org/wiki/Normal_balance

type "employer_commerce"."enum_EmployerCommerce_PointsAccountType" 2147483647 null

PointsAccounts purpose is to categorise points usage. This column store the type of PointsAccount

Indexes

Constraint Name Type Sort Column(s)
PointsAccounts_pkey Primary key Asc id
employer_commerce_PointsAccounts_type_idx Performance Asc type

Check Constraints

Constraint Name Constraint
PointsAccounts_balance_check ((balance >= (0)::numeric))

Relationships