admin/sql/migrate_t_issue_template.sql
zzh 4f5390ccb1 fix(channel): 问题模板表补充 ConcurrencyStamp 列
与 AggregateRoot 实体对齐,修复 list 接口 Unknown column 报错。
2026-07-06 15:21:43 +08:00

20 lines
932 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,
`ConcurrencyStamp` CHAR(36) NOT NULL DEFAULT (UUID()) COMMENT '并发戳',
`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='渠道-问题模板';