using Model.Entity.Inspection;
namespace Model.Dto.Inspection
{
///
/// 通知渠道 DTO(Id 转 string;Secret 出口脱敏为是否已配置)
///
public class AlertNotifyChannelDto
{
/// 主键 Id
public string? Id { get; set; }
/// 创建时间
public DateTime? CreateTime { get; set; }
/// 渠道类型(1飞书/2钉钉/3企微)
public NotifyChannelTypeEnum ChannelType { get; set; }
/// 渠道名称
public string? Name { get; set; }
/// Webhook 地址
public string? WebhookUrl { get; set; }
/// 加签密钥(入参可传;出口仅返回脱敏标记,不回传明文)
public string? Secret { get; set; }
/// 是否已配置加签密钥(出口专用)
public bool HasSecret { get; set; }
/// 推送模式(1直连/2Outbox跨网中转)
public NotifyPushModeEnum PushMode { get; set; }
/// 是否启用
public bool IsEnabled { get; set; }
/// 备注
public string? Remark { get; set; }
}
///
/// 通知规则 DTO
///
public class AlertNotifyRuleDto
{
/// 主键 Id
public string? Id { get; set; }
/// 创建时间
public DateTime? CreateTime { get; set; }
/// 规则名称
public string? RuleName { get; set; }
/// 适用告警级别(1信息/2警告/3紧急)
public AlertLevelEnum AlertLevel { get; set; }
/// 通知渠道Id
public string? ChannelId { get; set; }
/// 接收人(@手机号/账号,逗号分隔)
public string? Receivers { get; set; }
/// 是否通知当班值班人
public bool NotifyDutyPerson { get; set; }
/// 静默期(分钟)
public int SilenceMinutes { get; set; }
/// 是否启用
public bool IsEnabled { get; set; }
/// 备注
public string? Remark { get; set; }
}
///
/// 推送日志 DTO
///
public class AlertNotifyLogDto
{
/// 主键 Id
public string? Id { get; set; }
/// 告警消息Id("0"表示渠道测试推送)
public string? AlertId { get; set; }
/// 渠道类型
public NotifyChannelTypeEnum ChannelType { get; set; }
/// 渠道Id
public string? ChannelId { get; set; }
/// 推送目标(脱敏)
public string? Target { get; set; }
/// 推送内容摘要
public string? Content { get; set; }
/// 是否成功
public bool Success { get; set; }
/// 错误信息
public string? ErrorMsg { get; set; }
/// 重试次数
public int RetryCount { get; set; }
/// 推送时间
public DateTime NotifyTime { get; set; }
}
///
/// 值班排班 DTO
///
public class DutyRosterDto
{
/// 主键 Id
public string? Id { get; set; }
/// 创建时间
public DateTime? CreateTime { get; set; }
/// 值班日期
public DateTime DutyDate { get; set; }
/// 值班人姓名
public string? PersonName { get; set; }
/// 联系电话
public string? Phone { get; set; }
/// 备注
public string? Remark { get; set; }
}
}