Skip to content

public.customers

Description

Labels

svc-smarttab

Columns

NameTypeDefaultNullableChildrenParentsComment
idintegernextval('customers_id_seq'::regclass)falsepublic.orders public.bills public.loyalty_transactions public.receipts public.invoices
merchant_idintegerfalsepublic.merchants
customer_numbervarchar(50)false
namevarchar(255)false
phonevarchar(20)true
emailvarchar(255)true
addresstexttrue
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
customers_contact_checkCHECKCHECK (((phone IS NOT NULL) OR (email IS NOT NULL)))
customers_merchant_id_fkeyFOREIGN KEYFOREIGN KEY (merchant_id) REFERENCES merchants(id) ON DELETE RESTRICT
customers_pkeyPRIMARY KEYPRIMARY KEY (id)
uq_customers_merchant_customer_numberUNIQUEUNIQUE (merchant_id, customer_number)

Indexes

NameDefinition
customers_pkeyCREATE UNIQUE INDEX customers_pkey ON public.customers USING btree (id)
uq_customers_merchant_customer_numberCREATE UNIQUE INDEX uq_customers_merchant_customer_number ON public.customers USING btree (merchant_id, customer_number)
ix_customers_emailCREATE INDEX ix_customers_email ON public.customers USING btree (email)
ix_customers_merchant_idCREATE INDEX ix_customers_merchant_id ON public.customers USING btree (merchant_id)
ix_customers_phoneCREATE INDEX ix_customers_phone ON public.customers USING btree (phone)

Relations


Generated by tbls

MPAC — MP-Solution Advanced Cloud Service