Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | bigserial | 19 | √ | nextval('user_id_seq'::regclass) |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uuid | uuid | 2147483647 | null |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| user_name | varchar | 255 | null |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| display_name | varchar | 255 | null |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description | text | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| avatar | int8 | 19 | √ | null |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| varchar | 255 | null |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| email_verified | bool | 1 | √ | false |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| mobile | varchar | 255 | √ | null |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| password_hash | text | 2147483647 | null |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| read_speed | int4 | 10 | √ | 500 |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| base_gravity | int4 | 10 | 0 |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| curr_gravity | int4 | 10 | 0 |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| language | text | 2147483647 | 'zh_hant'::text |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| role | text | 2147483647 | 'user'::text |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| state | text | 2147483647 | 'active'::text |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| created_at | timestamptz | 35,6 | √ | CURRENT_TIMESTAMP |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| updated_at | timestamptz | 35,6 | √ | CURRENT_TIMESTAMP |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| remark | text | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| agree_on | timestamptz | 35,6 | √ | null |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| liker_id | varchar | 255 | √ | null |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| profile_cover | int8 | 19 | √ | null |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| payment_password_hash | text | 2147483647 | √ | null |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| user_pkey | Primary key | Asc | id |
| user_email_unique | Must be unique | Asc | |
| user_liker_id_unique | Must be unique | Asc | liker_id |
| user_state_index | Performance | Asc | state |
| user_user_name_unique | Must be unique | Asc | user_name |
| user_uuid_index | Performance | Asc | uuid |
| user_uuid_unique | Must be unique | Asc | uuid |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| user_role_check | ((role = ANY (ARRAY['user'::text, 'admin'::text]))) |
| user_language_check | ((language = ANY (ARRAY['zh_hant'::text, 'zh_hans'::text, 'en'::text]))) |
| user_state_check | ((state = ANY (ARRAY['onboarding'::text, 'active'::text, 'banned'::text, 'frozen'::text, 'archived'::text]))) |