Files
wdh-home 1e33640629
Some checks failed
CI / init (pull_request) Has been cancelled
CI / Frontend node 18.16.0 (pull_request) Has been cancelled
CI / Backend go (1.22) (pull_request) Has been cancelled
CI / release-pr (pull_request) Has been cancelled
CI / devops-test (1.22, 18.16.0) (pull_request) Has been cancelled
CI / release-please (pull_request) Has been cancelled
CI / devops-prod (1.22, 18.x) (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled
基础项目
2026-04-26 15:32:21 +08:00

34 lines
1.2 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- # 书籍系列表
--
-- ## 基本信息
--
-- 模块book
-- 表名book_series
-- 模型model/book/book_series.go
-- 迁移接入initialize/gorm_biz.go
-- 删除策略硬删表
-- 职责承载书籍系列主体信息用于组织同一作品的分部顺序和系列展示
CREATE TABLE book_series (
id bigserial PRIMARY KEY,
created_at timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
name varchar(128) NOT NULL,
cover_url varchar(500),
intro text,
is_enabled boolean NOT NULL DEFAULT true
);
COMMENT ON TABLE book_series IS '书籍系列表';
COMMENT ON COLUMN book_series.id IS '主键';
COMMENT ON COLUMN book_series.created_at IS '创建时间';
COMMENT ON COLUMN book_series.updated_at IS '更新时间';
COMMENT ON COLUMN book_series.name IS '系列名称';
COMMENT ON COLUMN book_series.cover_url IS '系列封面图片 URL';
COMMENT ON COLUMN book_series.intro IS '系列简介';
COMMENT ON COLUMN book_series.is_enabled IS '系列是否启用';
CREATE INDEX idx_book_series_name ON book_series (name);
CREATE INDEX idx_book_series_is_enabled ON book_series (is_enabled);
CREATE INDEX idx_book_series_created_at ON book_series (created_at);