irc-netcore-api/IRaCIS.Core.Domain/Common/EmailNoticeConfig.cs

156 lines
3.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using IRaCIS.Core.Domain.Share;
namespace IRaCIS.Core.Domain.Models;
[Comment("后台 - 邮件配置表表(需要同步)")]
[Table("EmailNoticeConfig")]
public class EmailNoticeConfig : BaseFullDeleteAuditEntity
{
#region 导航属性
[JsonIgnore]
public List<TrialEmailNoticeConfig> TrialEmailNoticeConfigList { get; set; }
[JsonIgnore]
public List<EmailNoticeUserType> EmailNoticeUserTypeList { get; set; } = new List<EmailNoticeUserType>();
#endregion
public string AttachCNPath { get; set; } = null!;
public string AttachName { get; set; } = null!;
public string AttachNameCN { get; set; } = null!;
public string AttachPath { get; set; } = null!;
[Comment("业务级别")]
public BusinessLevel BusinessLevelEnum { get; set; }
[Comment("业务模块")]
public BusinessModule BusinessModuleEnum { get; set; }
[Comment("业务场景")]
public EmailBusinessScenario BusinessScenarioEnum { get; set; }
public string Code { get; set; } = null!;
public string Description { get; set; } = null!;
[Comment("发送周期")]
public string EmailCron { get; set; } = null!;
[Comment("邮件延时秒数比如一个事件触发延迟多少s后才发邮件")]
public int? EmailDelaySeconds { get; set; } = null!;
[MaxLength]
public string EmailHtmlContent { get; set; } = null!;
[MaxLength]
public string EmailHtmlContentCN { get; set; } = null!;
public string EmailTopic { get; set; } = null!;
public string EmailTopicCN { get; set; } = null!;
[Comment("加急枚举")]
public int EmailUrgentEnum { get; set; }
[Comment("是否自动发送")]
public bool IsAutoSend { get; set; }
[Comment("是否区分标准")]
public bool IsDistinguishCriteria { get; set; }
public bool IsEnable { get; set; }
[Comment("是否需要回执")]
public bool IsReturnRequired { get; set; }
public SysEmailLevel SystemLevel { get; set; }
[Comment("标准枚举--后续废弃,这里可以选择多个标准")]
public CriterionType? CriterionTypeEnum { get; set; }
[Comment("邮件配置的多个标准")]
public List<CriterionType>? CriterionTypeList { get; set; }
}
[Comment("后台 - 邮件配置用户类型表(需要同步)")]
[Table("EmailNoticeUserType")]
public class EmailNoticeUserType : Entity
{
[JsonIgnore]
public EmailNoticeConfig EmailNoticeConfig { get; set; }
public Guid EmailNoticeConfigId { get; set; }
public UserTypeEnum UserType { get; set; }
public EmailUserType EmailUserType { get; set; }
}
public enum BusinessLevel
{
Default=0,
System=1,
//需要手动添加到项目的邮件
Trial=2,
//项目默认发送的邮件,不需要手动添加到项目
TrialDefault=3
}
public enum BusinessModule
{
/// <summary>
/// 影像质控
/// </summary>
ImageQualityControl = 1,
/// <summary>
/// 影像阅片
/// </summary>
ImageReading = 2,
/// <summary>
/// 系统登录
/// </summary>
Login = 4,
/// <summary>
/// 后台邮件
/// </summary>
BackstageEmail = 5,
/// <summary>
/// 账号信息
/// </summary>
UserAccount = 6,
/// <summary>
/// 中心调研
/// </summary>
SiteSurvey = 7,
/// <summary>
/// 阅片人管理
/// </summary>
ReviewerManagement = 8,
/// <summary>
/// 问题反馈
/// </summary>
UsersSuggestions = 9,
/// <summary>
/// 入组确认
/// </summary>
EligibilityVerification = 10,
/// <summary>
/// PD确认
/// </summary>
PDVerification = 11,
/// <summary>
/// 医学反馈
/// </summary>
MedicalQC = 13,
/// <summary>
/// 入组/PD确认
/// </summary>
Eligibility_PDVerification = 12,
}