Skip to content

public.loyalty_programs

Description

Labels

svc-smarttab

Columns

NameTypeDefaultNullableChildrenParentsComment
idintegernextval('loyalty_programs_id_seq'::regclass)falsepublic.loyalty_transactionsLoyalty program identifier.
merchant_idintegerfalsepublic.merchantsParent merchant ID.
program_namevarchar(255)falseLoyalty program display name.
points_per_unitnumeric(10,2)falsePoints earned per currency unit.
points_valuenumeric(10,4)falseCurrency value per point.
min_points_redeeminteger0falseMinimum points for redemption.
is_activebooleantruetrueLoyalty program active status.
created_attimestamp with time zonenow()trueRecord creation timestamp.
updated_attimestamp with time zonenow()trueRecord last update timestamp.

Viewpoints

NameDefinition
Customer & LoyaltyCustomer data, loyalty programs, and transactions

Constraints

NameTypeDefinition
loyalty_points_per_unit_checkCHECKCHECK ((points_per_unit > (0)::numeric))
loyalty_points_value_checkCHECKCHECK ((points_value > (0)::numeric))
loyalty_programs_merchant_id_fkeyFOREIGN KEYFOREIGN KEY (merchant_id) REFERENCES merchants(id) ON DELETE CASCADE
loyalty_programs_pkeyPRIMARY KEYPRIMARY KEY (id)

Indexes

NameDefinition
loyalty_programs_pkeyCREATE UNIQUE INDEX loyalty_programs_pkey ON public.loyalty_programs USING btree (id)
ix_loyalty_programs_merchant_idCREATE INDEX ix_loyalty_programs_merchant_id ON public.loyalty_programs USING btree (merchant_id)

Relations


Generated by tbls

MPAC — MP-Solution Advanced Cloud Service