
//--------------------------------------------------------------------
//     此代码由T4模板自动生成  byzhouhang 20210918
//	   生成时间 2022-10-20 11:51:58 
//     对此文件的更改可能会导致不正确的行为，并且如果重新生成代码，这些更改将会丢失。
using System;
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Collections.Generic;
using System.Linq;

namespace IRaCIS.Core.Domain.Models
{
	 ///<summary>
	 ///TrialEmailNoticeConfig
	 ///</summary>
	 [Table("TrialEmailNoticeConfig")]	
	 public class TrialEmailNoticeConfig : Entity, IAuditUpdate, IAuditAdd
	 {

		[Required]
		public Guid TrialId { get; set; }


		public string SMTPServerAddress { get; set; } = string.Empty;

		public int SMTPServerPort { get; set; }

		[Required]
		public string AuthorizationCode { get; set; } = string.Empty;


		public string FromName { get; set; } = string.Empty;
		public List<TrialEmailNoticeUser> TrialEmailNoticeUserList { get; set; } = new List<TrialEmailNoticeUser>();


		//[Required]

		//public string ReceiveEmailsStr { get; set; } = string.Empty;
		//public string CopyEmailsStr { get; set; } = string.Empty;

		//[NotMapped]
		//public List<string> ReceiveEmailList => ReceiveEmailsStr.Split('|', StringSplitOptions.RemoveEmptyEntries).Where(t => !string.IsNullOrEmpty(t)).Select(t=>t.Trim()).ToList();

		//[NotMapped]
		//public List<string> CopyEmailList => CopyEmailsStr.Split('|', StringSplitOptions.RemoveEmptyEntries).Where(t=> !string.IsNullOrEmpty(t)).Select(t => t.Trim()).ToList();



		public string FromEmail { get; set; } = string.Empty;

		[Required]
		public bool IsUrgent { get; set; }
	

		[Required]
		public string Code { get; set; } = string.Empty;



		[Required]
		public bool IsReturnRequired { get; set; }


	
		[Required]
		public bool IsAutoSend { get; set; }
	


		public CommonDocumentBusinessScenario BusinessScenarioEnum { get; set; }

		public CriterionType? CriterionTypeEnum { get; set; }


		public Guid? TrialReadingCriterionId { get; set; }

		[ForeignKey("TrialReadingCriterionId")]
		[JsonIgnore]
		public ReadingQuestionCriterionTrial TrialReadingCriterion { get; set; }

        [Required]
		public string FilePath { get; set; } = string.Empty;

		[Required]
		public string FileName { get; set; } = string.Empty;

		[Required]
		public Guid CreateUserId { get; set; }

		[Required]
		public DateTime CreateTime { get; set; }

		[Required]
		public Guid UpdateUserId { get; set; }

		[Required]
		public DateTime UpdateTime { get; set; }


	}

}	 
