admin/sql/migrate_t_issue_template.sql
zzh d49573fe9a feat(channel): 新增问题模板 CRUD 与 options API
支持按组织与问题类型维护通知模板,含建表脚本与仓储层唯一性校验。
2026-07-06 14:58:37 +08:00

19 lines
855 B
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.

-- 渠道-问题模板
CREATE TABLE IF NOT EXISTS `t_issue_template` (
`Id` BIGINT NOT NULL AUTO_INCREMENT,
`OrganizationId` CHAR(36) NULL COMMENT '归属组织 GUID;NULL=平台通用',
`IssueType` VARCHAR(32) NOT NULL COMMENT '问题类型 code',
`Title` VARCHAR(128) NOT NULL COMMENT '问题标题',
`Content` TEXT NOT NULL COMMENT '问题内容',
`NotifyMethod` VARCHAR(64) NOT NULL COMMENT '通知方式,逗号分隔',
`Status` TINYINT NOT NULL DEFAULT 1 COMMENT '0-禁用 1-启用',
`IsDeleted` TINYINT NOT NULL DEFAULT 0,
`CreateUserId` INT NOT NULL,
`CreateTime` DATETIME NOT NULL,
`UpdateUserId` INT NULL,
`UpdateTime` DATETIME NULL,
PRIMARY KEY (`Id`),
KEY `idx_issue_tpl_org_type` (`OrganizationId`, `IssueType`, `IsDeleted`),
KEY `idx_issue_tpl_status` (`Status`, `IsDeleted`)
) COMMENT='渠道-问题模板';