public.loyalty_programs
Description
Labels
svc-smarttab
Columns
| Name | Type | Default | Nullable | Children | Parents | Comment |
|---|---|---|---|---|---|---|
| id | integer | nextval('loyalty_programs_id_seq'::regclass) | false | public.loyalty_transactions | ||
| merchant_id | integer | false | public.merchants | |||
| program_name | varchar(255) | false | ||||
| points_per_unit | numeric(10,2) | false | ||||
| points_value | numeric(10,4) | false | ||||
| min_points_redeem | integer | 0 | false | |||
| is_active | boolean | true | true | |||
| created_at | timestamp with time zone | now() | true | |||
| updated_at | timestamp with time zone | now() | true |
Viewpoints
| Name | Definition |
|---|---|
| Customer & Loyalty | Customer data, loyalty programs, and transactions |
Constraints
| Name | Type | Definition |
|---|---|---|
| loyalty_points_per_unit_check | CHECK | CHECK ((points_per_unit > (0)::numeric)) |
| loyalty_points_value_check | CHECK | CHECK ((points_value > (0)::numeric)) |
| loyalty_programs_merchant_id_fkey | FOREIGN KEY | FOREIGN KEY (merchant_id) REFERENCES merchants(id) ON DELETE CASCADE |
| loyalty_programs_pkey | PRIMARY KEY | PRIMARY KEY (id) |
Indexes
| Name | Definition |
|---|---|
| loyalty_programs_pkey | CREATE UNIQUE INDEX loyalty_programs_pkey ON public.loyalty_programs USING btree (id) |
| ix_loyalty_programs_merchant_id | CREATE INDEX ix_loyalty_programs_merchant_id ON public.loyalty_programs USING btree (merchant_id) |
Relations
Generated by tbls