Skip to content

public.loyalty_programs

Description

Labels

svc-smarttab

Columns

NameTypeDefaultNullableChildrenParentsComment
idintegernextval('loyalty_programs_id_seq'::regclass)falsepublic.loyalty_transactions
merchant_idintegerfalsepublic.merchants
program_namevarchar(255)false
points_per_unitnumeric(10,2)false
points_valuenumeric(10,4)false
min_points_redeeminteger0false
is_activebooleantruetrue
created_attimestamp with time zonenow()true
updated_attimestamp with time zonenow()true

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