feat(ECR-026): OpsCMS ScheduledPublication 只读并 Closed

定时发布目录(ops_scheduled_publications),并加固 catalog 生成器。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jackyu66git
2026-08-08 03:13:36 +08:00
co-authored by Cursor
parent 8c50b3d925
commit b91806ba80
40 changed files with 1909 additions and 2 deletions
@@ -0,0 +1 @@
DROP TABLE IF EXISTS ops_scheduled_publications;
@@ -0,0 +1,19 @@
-- ECR-026 ScheduledPublication (read catalog)
CREATE TABLE IF NOT EXISTS ops_scheduled_publications (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
code varchar(64) NOT NULL UNIQUE,
title varchar(128) NOT NULL,
target_kind varchar(32) NOT NULL CHECK (target_kind IN ('banner','feed_slot')),
target_code varchar(64) NOT NULL,
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_ops_scheduled_publications_active ON ops_scheduled_publications(active);
INSERT INTO ops_scheduled_publications(code, title, target_kind, target_code, active, system)
VALUES ('home_banner_week', '首页横幅周排期占位', 'banner', 'home_promo', true, true)
ON CONFLICT (code) DO NOTHING;