优化企业网站功能

This commit is contained in:
2026-08-20 16:21:07 +08:00
parent 112d60b993
commit 3f0fcb88e7
45 changed files with 8758 additions and 5058 deletions
+35
View File
@@ -0,0 +1,35 @@
-- CMS 产品与产品分类表(对应 backend 租户端 apps/cms/product 模块)
-- 接口:/backend/productsList、/backend/addProducts、/backend/editProducts/:id、/backend/deleteProducts/:id
-- /backend/productsTypesList、/backend/addProductsTypes、/backend/editProductsTypes/:id、/backend/deleteProductsTypes/:id
CREATE TABLE IF NOT EXISTS yz_cms_product (
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 '产品描述',
content mediumtext 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_product_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产品分类';