Columns
Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
customer_id | int4 | 10 | null |
|
|
Primary Key: an identifier for this record |
||||||||||||||||||||||||||||||||||||||||||||||||||
node_id | int4 | 10 | null |
|
|
Which PBJ node this customer came from |
||||||||||||||||||||||||||||||||||||||||||||||||||
customer_ip | text | 2147483647 | √ | null |
|
|
Customers IP Address |
|||||||||||||||||||||||||||||||||||||||||||||||||
account_id | int4 | 10 | null |
|
|
Account of this customer |
||||||||||||||||||||||||||||||||||||||||||||||||||
firstname | text | 2147483647 | null |
|
|
E.g. “Joe” |
||||||||||||||||||||||||||||||||||||||||||||||||||
lastname | text | 2147483647 | null |
|
|
E.g. “Smith” |
||||||||||||||||||||||||||||||||||||||||||||||||||
dob | date | 13 | √ | null |
|
|
Date of birth |
|||||||||||||||||||||||||||||||||||||||||||||||||
dob_dim_date_id | int4 | 10 | √ | null |
|
|
See table dim_date |
|||||||||||||||||||||||||||||||||||||||||||||||||
address | text | 2147483647 | √ | null |
|
|
Street Address |
|||||||||||||||||||||||||||||||||||||||||||||||||
suburb | text | 2147483647 | √ | null |
|
|
Suburb |
|||||||||||||||||||||||||||||||||||||||||||||||||
postcode | text | 2147483647 | √ | null |
|
|
Postcode |
|||||||||||||||||||||||||||||||||||||||||||||||||
state | text | 2147483647 | √ | null |
|
|
State Code |
|||||||||||||||||||||||||||||||||||||||||||||||||
country | bpchar | 2 | √ | null |
|
|
Country Code |
|||||||||||||||||||||||||||||||||||||||||||||||||
phone | text | 2147483647 | √ | null |
|
|
Any phone number |
|||||||||||||||||||||||||||||||||||||||||||||||||
mobile | text | 2147483647 | √ | null |
|
|
Any mobile number |
|||||||||||||||||||||||||||||||||||||||||||||||||
text | 2147483647 | √ | null |
|
|
Email address of contact (also their identifier) |
||||||||||||||||||||||||||||||||||||||||||||||||||
timezone | text | 2147483647 | √ | null |
|
|
Timezone presented to this customer |
|||||||||||||||||||||||||||||||||||||||||||||||||
customer_timestamp | timestamptz | 35,6 | now() |
|
|
Date + Time of entry |
||||||||||||||||||||||||||||||||||||||||||||||||||
signup_dim_date_id | int4 | 10 | √ | null |
|
|
Date (linked by dim_date) when this customer signed up |
|||||||||||||||||||||||||||||||||||||||||||||||||
pricing_id | int4 | 10 | null |
|
|
Pricing level this customer is signed up for |
||||||||||||||||||||||||||||||||||||||||||||||||||
language_id | bpchar | 2 | √ | null |
|
|
Customer default language |
|||||||||||||||||||||||||||||||||||||||||||||||||
locale | bpchar | 5 | √ | null |
|
|
Which locale is used to present to the customer |
|||||||||||||||||||||||||||||||||||||||||||||||||
customer_type_id | int4 | 10 | null |
|
|
What kind of customer is this (1: ozlotteries; 2: mail_order; 3: ars; 4: yahoo; 5: ninemsn) |
||||||||||||||||||||||||||||||||||||||||||||||||||
active | bool | 1 | true |
|
|
Customer is active |
||||||||||||||||||||||||||||||||||||||||||||||||||
promotion_code | text | 2147483647 | √ | null |
|
|
Promo code the customer used to sign up |
|||||||||||||||||||||||||||||||||||||||||||||||||
registered_source | text | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
customer_internal | bool | 1 | false |
|
|
A customer for system use or testing purposes only |
||||||||||||||||||||||||||||||||||||||||||||||||||
html_email | bool | 1 | √ | true |
|
|
Does the customer want HTML email? |
|||||||||||||||||||||||||||||||||||||||||||||||||
failed_login_attempts | int2 | 5 | √ | 0 |
|
|
How many failed login attempts the customer has had |
|||||||||||||||||||||||||||||||||||||||||||||||||
recurring_purchase_method_id | int4 | 10 | √ | 1 |
|
|
1: MANUAL; 2: FIXED; 3: BALANCE |
|||||||||||||||||||||||||||||||||||||||||||||||||
site_variant_id | int2 | 5 | null |
|
|
Site type this customer uses |
||||||||||||||||||||||||||||||||||||||||||||||||||
gender | bpchar | 1 | √ | null |
|
|
Male/Female/Unspecified |
|||||||||||||||||||||||||||||||||||||||||||||||||
dim_location_id | int4 | 10 | √ | null |
|
|
Deprecated |
|||||||||||||||||||||||||||||||||||||||||||||||||
locked | bool | 1 | false |
|
|
Is customer locked |
||||||||||||||||||||||||||||||||||||||||||||||||||
total_deposits | numeric | 17,2 | √ | null |
|
|
Sum of all deposits made by this customer |
|||||||||||||||||||||||||||||||||||||||||||||||||
dim_mobile | bigserial | 19 | √ | nextval('customer_dim_mobile_seq'::regclass) |
|
|
Deprecated |
|||||||||||||||||||||||||||||||||||||||||||||||||
title | text | 2147483647 | √ | null |
|
|
Formal title for customer: Mr/miss/mrs/ms/dr |
|||||||||||||||||||||||||||||||||||||||||||||||||
customer_external_id | text | 2147483647 | √ | null |
|
|
ID used by third party buyers |
|||||||||||||||||||||||||||||||||||||||||||||||||
customer_encoded_id | text | 2147483647 | √ | null |
|
|
Externally available encoding of the customer ID |
|||||||||||||||||||||||||||||||||||||||||||||||||
return_mail_to_sender | bool | 1 | false |
|
|
Should mail be returned to sender |
||||||||||||||||||||||||||||||||||||||||||||||||||
id_verified | timestamptz | 35,6 | √ | null |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
row_updated | timestamptz | 35,6 | '2021-01-01 10:00:00+10'::timestamp with time zone |
|
|
Timestamp when the customer was updated with default 2021-01-01 |
||||||||||||||||||||||||||||||||||||||||||||||||||
dim_affiliate_id | int4 | 10 | √ | null |
|
|
Ref: see table dim_affiliate |
Indexes
Constraint Name | Type | Sort | Column(s) |
---|---|---|---|
customer_pkey | Primary key | Asc | customer_id |
customer_ai | Performance | Asc | account_id |
customer_ct | Performance | Asc | customer_timestamp |
customer_dddi | Performance | Asc | dob_dim_date_id |
customer_dli | Performance | Asc | dim_location_id |
customer_email_lower | Performance | ||
customer_g | Performance | Asc | gender |
customer_sddi | Performance | Asc | signup_dim_date_id |
idx_customer_dim_affiliate_id | Performance | Asc | dim_affiliate_id |