Files
yunzerwebsiteallinone/sql/yz_cms_solution.sql
T
2026-08-20 16:21:07 +08:00

35 lines
1.8 KiB
SQL
Raw 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.
-- CMS 解决方案(特色服务)与分类表(对应 backend 租户端 apps/cms/solution 模块)
-- 接口:/backend/servicesList、/backend/addServices、/backend/editServices/:id、/backend/deleteServices/:id
-- /backend/servicesTypesList、/backend/addServicesTypes、/backend/editServicesTypes/:id、/backend/deleteServicesTypes/:id
CREATE TABLE IF NOT EXISTS yz_cms_solution (
id bigint unsigned NOT NULL AUTO_INCREMENT,
tid bigint unsigned NOT NULL DEFAULT 0 COMMENT '租户ID',
title varchar(100) NOT NULL DEFAULT '' COMMENT '名称',
thumb varchar(500) NOT NULL DEFAULT '' COMMENT '图片',
`desc` varchar(500) NOT NULL DEFAULT '' COMMENT '描述',
url varchar(500) NOT NULL DEFAULT '' COMMENT '跳转地址',
sort int NOT NULL DEFAULT 0 COMMENT '排序',
status tinyint NOT NULL DEFAULT 1 COMMENT '状态 1启用 0禁用',
create_time datetime NOT NULL,
update_time datetime DEFAULT NULL,
delete_time datetime DEFAULT NULL COMMENT '软删除时间',
PRIMARY KEY (id),
KEY idx_tid_status (tid, status)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='CMS解决方案(特色服务)';
CREATE TABLE IF NOT EXISTS yz_cms_solution_category (
id bigint unsigned NOT NULL AUTO_INCREMENT,
tid bigint unsigned NOT NULL DEFAULT 0 COMMENT '租户ID',
title varchar(100) NOT NULL DEFAULT '' COMMENT '分类名称',
pid bigint unsigned NOT NULL DEFAULT 0 COMMENT '父级分类ID,0为顶级',
`desc` varchar(500) NOT NULL DEFAULT '' COMMENT '分类描述',
sort int NOT NULL DEFAULT 0 COMMENT '排序',
status tinyint NOT NULL DEFAULT 1 COMMENT '状态 1启用 0禁用',
create_time datetime NOT NULL,
update_time datetime DEFAULT NULL,
delete_time datetime DEFAULT NULL COMMENT '软删除时间',
PRIMARY KEY (id),
KEY idx_tid_pid (tid, pid)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='CMS解决方案分类';