增加构建通知
This commit is contained in:
parent
49c65b6886
commit
41c7a88542
@ -34,16 +34,31 @@ public class TeamEnvironmentNotificationConfigDTO extends BaseDTO {
|
||||
*/
|
||||
private Boolean deployNotificationEnabled;
|
||||
|
||||
/**
|
||||
* 部署通知模板ID
|
||||
*/
|
||||
private Long deployNotificationTemplateId;
|
||||
|
||||
/**
|
||||
* 是否启用构建通知
|
||||
*/
|
||||
private Boolean buildNotificationEnabled;
|
||||
|
||||
/**
|
||||
* 构建通知模板ID
|
||||
*/
|
||||
private Long buildNotificationTemplateId;
|
||||
|
||||
/**
|
||||
* 构建失败时是否发送日志文件到企业微信
|
||||
*/
|
||||
private Boolean buildFailureFileEnabled;
|
||||
|
||||
/**
|
||||
* 构建失败通知模板ID
|
||||
*/
|
||||
private Long buildFailureNotificationTemplateId;
|
||||
|
||||
// ===== 扩展字段(非数据库字段) =====
|
||||
|
||||
/**
|
||||
|
||||
@ -25,18 +25,36 @@ public class UserTeamEnvironmentNotificationConfigDTO {
|
||||
@Schema(description = "是否启用部署通知")
|
||||
private Boolean deployNotificationEnabled;
|
||||
|
||||
/**
|
||||
* 部署通知模板ID
|
||||
*/
|
||||
@Schema(description = "部署通知模板ID")
|
||||
private Long deployNotificationTemplateId;
|
||||
|
||||
/**
|
||||
* 是否启用构建通知
|
||||
*/
|
||||
@Schema(description = "是否启用构建通知")
|
||||
private Boolean buildNotificationEnabled;
|
||||
|
||||
/**
|
||||
* 构建通知模板ID
|
||||
*/
|
||||
@Schema(description = "构建通知模板ID")
|
||||
private Long buildNotificationTemplateId;
|
||||
|
||||
/**
|
||||
* 构建失败时是否发送日志文件到企业微信
|
||||
*/
|
||||
@Schema(description = "构建失败时是否发送日志文件到企业微信")
|
||||
private Boolean buildFailureFileEnabled;
|
||||
|
||||
/**
|
||||
* 构建失败通知模板ID
|
||||
*/
|
||||
@Schema(description = "构建失败通知模板ID")
|
||||
private Long buildFailureNotificationTemplateId;
|
||||
|
||||
// ===== 扩展字段(非数据库字段) =====
|
||||
|
||||
/**
|
||||
|
||||
@ -70,22 +70,6 @@ public class TeamEnvironmentConfig extends Entity<Long> {
|
||||
@Column(name = "approver_user_ids", columnDefinition = "JSON")
|
||||
private List<Long> approverUserIds;
|
||||
|
||||
// ===== 通知配置 =====
|
||||
|
||||
/**
|
||||
* 通知渠道ID
|
||||
* <p>关联 sys_notification_channel 表
|
||||
*/
|
||||
@Column(name = "notification_channel_id")
|
||||
private Long notificationChannelId;
|
||||
|
||||
/**
|
||||
* 是否启用部署通知
|
||||
*/
|
||||
@Column(name = "notification_enabled", nullable = false, columnDefinition = "BOOLEAN DEFAULT TRUE")
|
||||
private Boolean notificationEnabled = true;
|
||||
|
||||
// ===== 安全策略 =====
|
||||
|
||||
/**
|
||||
* 是否要求代码审查通过才能部署
|
||||
|
||||
@ -51,15 +51,33 @@ public class TeamEnvironmentNotificationConfig extends Entity<Long> {
|
||||
@Column(name = "deploy_notification_enabled", nullable = false, columnDefinition = "BIT DEFAULT 1")
|
||||
private Boolean deployNotificationEnabled = true;
|
||||
|
||||
/**
|
||||
* 部署通知模板ID(关联sys_notification_template)
|
||||
*/
|
||||
@Column(name = "deploy_notification_template_id")
|
||||
private Long deployNotificationTemplateId;
|
||||
|
||||
/**
|
||||
* 是否启用构建通知
|
||||
*/
|
||||
@Column(name = "build_notification_enabled", nullable = false)
|
||||
private Boolean buildNotificationEnabled = false;
|
||||
|
||||
/**
|
||||
* 构建通知模板ID(关联sys_notification_template)
|
||||
*/
|
||||
@Column(name = "build_notification_template_id")
|
||||
private Long buildNotificationTemplateId;
|
||||
|
||||
/**
|
||||
* 构建失败时是否发送日志文件到企业微信
|
||||
*/
|
||||
@Column(name = "build_failure_file_enabled", nullable = false)
|
||||
private Boolean buildFailureFileEnabled = false;
|
||||
|
||||
/**
|
||||
* 构建失败通知模板ID(关联sys_notification_template)
|
||||
*/
|
||||
@Column(name = "build_failure_notification_template_id")
|
||||
private Long buildFailureNotificationTemplateId;
|
||||
}
|
||||
|
||||
@ -869,13 +869,16 @@ CREATE TABLE deploy_team_environment_notification_config
|
||||
version INT NOT NULL DEFAULT 1 COMMENT '版本号',
|
||||
deleted BIT NOT NULL DEFAULT 0 COMMENT '是否删除',
|
||||
|
||||
team_id BIGINT NOT NULL COMMENT '团队ID',
|
||||
environment_id BIGINT NOT NULL COMMENT '环境ID',
|
||||
team_id BIGINT NOT NULL COMMENT '团队ID',
|
||||
environment_id BIGINT NOT NULL COMMENT '环境ID',
|
||||
|
||||
notification_channel_id BIGINT NULL COMMENT '通知渠道ID(关联sys_notification_channel)',
|
||||
deploy_notification_enabled BIT NOT NULL DEFAULT 1 COMMENT '是否启用部署通知',
|
||||
build_notification_enabled BIT NOT NULL DEFAULT 0 COMMENT '是否启用构建通知',
|
||||
build_failure_log_enabled BIT NOT NULL DEFAULT 0 COMMENT '构建失败时是否附加错误日志到通知(0:不附加,1:附加)',
|
||||
notification_channel_id BIGINT NULL COMMENT '通知渠道ID(关联sys_notification_channel)',
|
||||
deploy_notification_enabled BIT NOT NULL DEFAULT 1 COMMENT '是否启用部署通知',
|
||||
deploy_notification_template_id BIGINT NULL COMMENT '部署通知模板ID(关联sys_notification_template)',
|
||||
build_notification_enabled BIT NOT NULL DEFAULT 0 COMMENT '是否启用构建通知',
|
||||
build_notification_template_id BIGINT NULL COMMENT '构建通知模板ID(关联sys_notification_template)',
|
||||
build_failure_log_enabled BIT NOT NULL DEFAULT 0 COMMENT '构建失败时是否附加错误日志到通知(0:不附加,1:附加)',
|
||||
build_failure_notification_template_id BIGINT NULL COMMENT '构建失败通知模板ID(关联sys_notification_template)',
|
||||
|
||||
UNIQUE INDEX uk_team_env (team_id, environment_id),
|
||||
INDEX idx_team (team_id),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user