namespace Admin.NET.Plugin.ApprovalFlow;
///
/// 审批流通知模板(P4-16 延伸)
/// 一条模板 = 一对 (NotifyType, BizType);BizType="" 表示全局默认,非空表示业务定制覆盖。
/// Title / Content 支持变量插值:{title} {nodeName} {initiatorName} {fromName} {statusText} 等。
/// 未匹配到启用模板时,FlowNotifyService 回退到代码内置默认文案。
///
[SugarTable(null, "审批流通知模板")]
[SugarIndex("idx_notifytpl_type_biz", nameof(NotifyType), OrderByType.Asc, nameof(BizType), OrderByType.Asc, true)]
public class ApprovalFlowNotifyTemplate : EntityBase
{
///
/// 通知类型(NewTask / Urge / FlowCompleted / Transferred / Returned / AddSign / Withdrawn / Escalated / Timeout)
///
[SugarColumn(ColumnDescription = "通知类型", Length = 32)]
[Required, MaxLength(32)]
public string NotifyType { get; set; } = "";
///
/// 业务类型编码;空字符串 = 全局默认,非空 = 按业务覆盖
///
[SugarColumn(ColumnDescription = "业务类型", Length = 32, DefaultValue = "")]
[MaxLength(32)]
public string BizType { get; set; } = "";
///
/// 标题模板(支持 {变量})
///
[SugarColumn(ColumnDescription = "标题模板", Length = 256)]
[Required, MaxLength(256)]
public string Title { get; set; } = "";
///
/// 正文模板(支持 {变量})
///
[SugarColumn(ColumnDescription = "正文模板", Length = 1024)]
[Required, MaxLength(1024)]
public string Content { get; set; } = "";
///
/// 是否启用
///
[SugarColumn(ColumnDescription = "是否启用", DefaultValue = "1")]
public bool IsEnabled { get; set; } = true;
///
/// 是否系统预置(预置模板不可删除,但可编辑覆盖)
///
[SugarColumn(ColumnDescription = "是否系统预置", DefaultValue = "0")]
public bool IsSystem { get; set; }
///
/// 备注
///
[SugarColumn(ColumnDescription = "备注", Length = 256, IsNullable = true)]
[MaxLength(256)]
public string? Remark { get; set; }
}