Календарь пассивных окон по дням недели (вторник весь день по Тампе): агенты в режиме passive; API; тесты; docs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
15
packages/khb_common/migrations/019_agent_passive_window.sql
Normal file
15
packages/khb_common/migrations/019_agent_passive_window.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
-- Календарь пассивных окон по дням недели: в это время все агенты в режиме passive (сами не пишут, на сообщения отвечают как обычно).
|
||||
-- Первое окно: встреча менеджеров по вторникам (обсуждают статус работ).
|
||||
create table agent_passive_window (
|
||||
id uuid primary key default gen_random_uuid(),
|
||||
weekday smallint not null check (weekday between 1 and 7), -- ISO: 1 - понедельник ... 7 - воскресенье
|
||||
from_minute smallint not null default 0 check (from_minute between 0 and 1439), -- минут от полуночи, включительно
|
||||
to_minute smallint not null default 1440 check (to_minute between 1 and 1440), -- минут от полуночи, не включительно (1440 - до конца дня)
|
||||
timezone text not null default 'America/New_York',
|
||||
is_active boolean not null default true,
|
||||
note text,
|
||||
created_at timestamptz not null default now(),
|
||||
check (from_minute < to_minute)
|
||||
);
|
||||
alter table agent_passive_window enable row level security;
|
||||
insert into agent_passive_window (weekday, from_minute, to_minute, note) values (2, 0, 1440, 'встреча менеджеров по вторникам: обсуждают статус работ');
|
||||
Reference in New Issue
Block a user