ApprovalFlowNotifyConfig.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. namespace Admin.NET.Plugin.ApprovalFlow;
  2. /// <summary>
  3. /// 审批流通知渠道配置覆盖层(P4-16 延伸)
  4. /// 一条记录 = 一个渠道的运行时覆盖。
  5. /// FlowNotifyService 读取时:DB 有则用 DB,无则回退 ApprovalFlow.json。零破坏升级。
  6. /// </summary>
  7. [SugarTable(null, "审批流通知渠道配置")]
  8. [SugarIndex("idx_notifycfg_channel", nameof(ChannelKey), OrderByType.Asc, true)]
  9. public class ApprovalFlowNotifyConfig : EntityBase
  10. {
  11. /// <summary>
  12. /// 渠道标识(SignalR / Email / Sms / DingTalk / WorkWeixin),与 INotifyPusher.Channel 对齐
  13. /// </summary>
  14. [SugarColumn(ColumnDescription = "渠道标识", Length = 16)]
  15. [Required, MaxLength(16)]
  16. public string ChannelKey { get; set; } = "";
  17. /// <summary>
  18. /// 是否启用
  19. /// </summary>
  20. [SugarColumn(ColumnDescription = "是否启用", DefaultValue = "0")]
  21. public bool Enabled { get; set; }
  22. /// <summary>
  23. /// Webhook URL(钉钉 / 企业微信群机器人)
  24. /// </summary>
  25. [SugarColumn(ColumnDescription = "WebhookURL", Length = 512, IsNullable = true)]
  26. [MaxLength(512)]
  27. public string? WebhookUrl { get; set; }
  28. /// <summary>
  29. /// 加签 Secret(钉钉,可选)
  30. /// </summary>
  31. [SugarColumn(ColumnDescription = "加签Secret", Length = 128, IsNullable = true)]
  32. [MaxLength(128)]
  33. public string? Secret { get; set; }
  34. /// <summary>
  35. /// 短信运营商模板 Id
  36. /// </summary>
  37. [SugarColumn(ColumnDescription = "短信模板Id", Length = 64, IsNullable = true)]
  38. [MaxLength(64)]
  39. public string? TemplateId { get; set; }
  40. /// <summary>
  41. /// 备注
  42. /// </summary>
  43. [SugarColumn(ColumnDescription = "备注", Length = 256, IsNullable = true)]
  44. [MaxLength(256)]
  45. public string? Remark { get; set; }
  46. }