feat(ECR-033): AskOperations HandoffCase 只读并 Closed

HandoffCase catalog (000034) · Loop continuous.
This commit is contained in:
jackyu66git
2026-08-08 03:15:45 +08:00
parent 01063208a1
commit 487bee78d1
25 changed files with 457 additions and 1 deletions
@@ -0,0 +1 @@
DROP TABLE IF EXISTS ask_handoff_cases;
@@ -0,0 +1,18 @@
-- ECR-033 HandoffCase (read catalog)
CREATE TABLE IF NOT EXISTS ask_handoff_cases (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
code varchar(64) NOT NULL UNIQUE,
title varchar(128) NOT NULL,
status varchar(32) NOT NULL CHECK (status IN ('open','closed')),
active boolean NOT NULL DEFAULT true,
system boolean NOT NULL DEFAULT false,
created_at timestamptz NOT NULL DEFAULT now(),
updated_at timestamptz NOT NULL DEFAULT now()
);
CREATE INDEX IF NOT EXISTS idx_ask_handoff_cases_active ON ask_handoff_cases(active);
INSERT INTO ask_handoff_cases(code, title, status, active, system)
VALUES ('demo_handoff', '示例转接案', 'closed', true, true)
ON CONFLICT (code) DO NOTHING;