staff_users
Staff accounts (Проектный отдел) with access to admin portal
Записей: ~5
Колонки
| Колонка | Тип | Nullable | Default | Описание |
|---|---|---|---|---|
| id 🔑 | uuid | NOT NULL | uuid_generate_v4() | |
| 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 | |
| is_superuser | boolean | NULL | false | Superuser has all permissions without explicit grants |
| 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_staff_users_email | CREATE INDEX idx_staff_users_email ON public.staff_users USING btree (email) |
| idx_staff_users_is_active | CREATE INDEX idx_staff_users_is_active ON public.staff_users USING btree (is_... |
| staff_users_email_key | CREATE UNIQUE INDEX staff_users_email_key ON public.staff_users USING btree (... |
| staff_users_pkey | CREATE UNIQUE INDEX staff_users_pkey ON public.staff_users USING btree (id) |
Используется в
- bug_reports — через created_by
- staff_password_reset_tokens — через staff_user_id
- staff_permissions — через staff_user_id