feat(ECR-030): ContentSafety ModerationCase 只读并 Closed
ModerationCase catalog (000031) · Loop continuous.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
DROP TABLE IF EXISTS moderation_cases;
|
||||
@@ -0,0 +1,18 @@
|
||||
-- ECR-030 ModerationCase (read catalog)
|
||||
|
||||
CREATE TABLE IF NOT EXISTS moderation_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_moderation_cases_active ON moderation_cases(active);
|
||||
|
||||
INSERT INTO moderation_cases(code, title, status, active, system)
|
||||
VALUES ('demo_case_seed', '示例审核案', 'closed', true, true)
|
||||
ON CONFLICT (code) DO NOTHING;
|
||||
Reference in New Issue
Block a user