书籍模块

This commit is contained in:
2026-04-27 10:12:21 +08:00
parent 1e33640629
commit 13db6e89f0
33 changed files with 8820 additions and 738 deletions

View File

@@ -28,9 +28,17 @@ WHERE NOT EXISTS (
-- book 业务字典初始化补齐 / sys_dictionaries, sys_dictionary_details / 2026-04-26
DELETE FROM sys_dictionary_details d
USING sys_dictionaries dict
WHERE d.sys_dictionary_id = dict.id
AND dict.type = 'book_author_status';
DELETE FROM sys_dictionaries
WHERE type = 'book_author_status';
WITH dict_seed(name, type, status, description) AS (
VALUES
('作者状态', 'book_author_status', true, '作者状态字典'),
('通用启用状态', 'common_enabled_status', true, '通用启用禁用状态字典'),
('书籍评论状态', 'book_comment_status', true, '书籍评论状态字典'),
('书籍完结状态', 'book_completion_status', true, '书籍完结状态字典'),
('书籍时代标签', 'book_era_tag', true, '书籍时代标签字典'),
@@ -48,7 +56,7 @@ WHERE d.type = s.type;
WITH dict_seed(name, type, status, description) AS (
VALUES
('作者状态', 'book_author_status', true, '作者状态字典'),
('通用启用状态', 'common_enabled_status', true, '通用启用禁用状态字典'),
('书籍评论状态', 'book_comment_status', true, '书籍评论状态字典'),
('书籍完结状态', 'book_completion_status', true, '书籍完结状态字典'),
('书籍时代标签', 'book_era_tag', true, '书籍时代标签字典'),
@@ -64,8 +72,8 @@ WHERE NOT EXISTS (
WITH detail_seed(dict_type, label, value, sort, status) AS (
VALUES
('book_author_status', '启用', 'enabled', 10, true),
('book_author_status', '禁用', 'disabled', 20, true),
('common_enabled_status', '启用', 'enabled', 10, true),
('common_enabled_status', '禁用', 'disabled', 20, true),
('book_comment_status', '正常', 'normal', 10, true),
('book_comment_status', '隐藏', 'hidden', 20, true),
('book_completion_status', '完结', 'completed', 10, true),
@@ -100,8 +108,8 @@ WHERE d.sys_dictionary_id = dict.id
WITH detail_seed(dict_type, label, value, sort, status) AS (
VALUES
('book_author_status', '启用', 'enabled', 10, true),
('book_author_status', '禁用', 'disabled', 20, true),
('common_enabled_status', '启用', 'enabled', 10, true),
('common_enabled_status', '禁用', 'disabled', 20, true),
('book_comment_status', '正常', 'normal', 10, true),
('book_comment_status', '隐藏', 'hidden', 20, true),
('book_completion_status', '完结', 'completed', 10, true),