organization_users
User accounts for organization portal access
Записей: ~56
Колонки
| Колонка | Тип | Nullable | Default | Описание |
|---|---|---|---|---|
| id 🔑 | uuid | NOT NULL | uuid_generate_v4() | |
| organization_id | integer(32) | NOT NULL | → organizations(id) | |
| character varying(255) | NOT NULL | |||
| password_hash | character varying(255) | NOT NULL | ||
| first_name | character varying(100) | NULL | ||
| last_name | character varying(100) | NULL | ||
| is_active | boolean | NULL | true | |
| must_change_password | boolean | NULL | true | True if user must change password on next login |
| password_changed_at | timestamp without time zone | NULL | ||
| failed_login_attempts | integer(32) | NULL | 0 | Counter for failed login attempts, resets on successful login |
| locked_until | timestamp without time zone | NULL | Account locked until this timestamp after too many failed attempts | |
| created_at | timestamp without time zone | NULL | CURRENT_TIMESTAMP | |
| updated_at | timestamp without time zone | NULL | CURRENT_TIMESTAMP | |
| last_login_at | timestamp without time zone | NULL | ||
| can_view_monitoring | boolean | NULL | true | |
| can_view_stats_callcenter | boolean | NULL | true | |
| can_view_stats_terminals | boolean | NULL | true | |
| can_view_stats_operators | boolean | NULL | true | |
| can_manage_schedules | boolean | NULL | true | |
| can_view_billing | boolean | NULL | false |
🔑 = Primary Key, → = Foreign Key
Индексы
| Имя | Определение |
|---|---|
| idx_organization_users_email | CREATE INDEX idx_organization_users_email ON public.organization_users USING ... |
| idx_organization_users_is_active | CREATE INDEX idx_organization_users_is_active ON public.organization_users US... |
| idx_organization_users_organization_id | CREATE INDEX idx_organization_users_organization_id ON public.organization_us... |
| organization_users_email_key | CREATE UNIQUE INDEX organization_users_email_key ON public.organization_users... |
| organization_users_pkey | CREATE UNIQUE INDEX organization_users_pkey ON public.organization_users USIN... |
Foreign Keys
| Колонка | Ссылка на |
|---|---|
| organization_id | organizations(id) |
Используется в
- operators — через user_id
- password_reset_tokens — через user_id