feat: 优化文案模板分组与复制预览
This commit is contained in:
@@ -5,6 +5,7 @@ DROP TABLE IF EXISTS tt_copy_template;
|
||||
CREATE TABLE tt_copy_template (
|
||||
template_id BIGINT NOT NULL AUTO_INCREMENT COMMENT '模板ID',
|
||||
template_name VARCHAR(100) NOT NULL COMMENT '按钮显示名称',
|
||||
template_group VARCHAR(100) NOT NULL DEFAULT '默认分组' COMMENT '模板分组',
|
||||
template_body LONGTEXT NOT NULL COMMENT '文案模板内容,支持 {变量} 占位符',
|
||||
sort_num INT DEFAULT 0 COMMENT '排序号',
|
||||
status CHAR(1) DEFAULT '0' COMMENT '状态(0正常 1停用)',
|
||||
|
||||
8
sql/copy_template_group.sql
Normal file
8
sql/copy_template_group.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
-- 文案模板增加分组字段(已有数据库升级脚本)
|
||||
ALTER TABLE `tt_copy_template`
|
||||
ADD COLUMN `template_group` VARCHAR(100) NOT NULL DEFAULT '默认分组' COMMENT '模板分组' AFTER `template_name`;
|
||||
|
||||
-- 兼容历史空数据
|
||||
UPDATE `tt_copy_template`
|
||||
SET `template_group` = '默认分组'
|
||||
WHERE `template_group` IS NULL OR TRIM(`template_group`) = '';
|
||||
Reference in New Issue
Block a user