
//--------------------------------------------------------------------
//     此代码由T4模板自动生成  byzhouhang 20210918
//	   生成时间 2022-03-04 13:33:37 
//     对此文件的更改可能会导致不正确的行为，并且如果重新生成代码，这些更改将会丢失。
using IRaCIS.Core.Domain.Share;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Domain.Models
{
	 ///<summary>
	 ///TrialExternalUser
	 ///</summary>
	 [Table("TrialExternalUser")]	
	 public class TrialExternalUser : Entity, IAuditUpdate, IAuditAdd
	 {
		[JsonIgnore]
		public  Trial Trial { get; set; }
		
		/// <summary>
        /// TrialId
        /// </summary>
		[Required]
		public Guid TrialId { get; set; }
	
		
		public Guid UserTypeId { get; set; }
	
		/// <summary>
        /// CreateTime
        /// </summary>
		[Required]
		public DateTime CreateTime { get; set; }
	
		/// <summary>
        /// CreateUserId
        /// </summary>
		[Required]
		public Guid CreateUserId { get; set; }
	
		/// <summary>
        /// UpdateTime
        /// </summary>
		[Required]
		public DateTime UpdateTime { get; set; }
	
		/// <summary>
        /// UpdateUserId
        /// </summary>
		[Required]
		public Guid UpdateUserId { get; set; }
	
		/// <summary>
        /// Phone
        /// </summary>
		[Required]
		public string Phone { get; set; } = String.Empty;

		/// <summary>
		/// Email
		/// </summary>
		[Required]
		public string Email { get; set; }
	
		/// <summary>
        /// FirstName
        /// </summary>
		[Required]
		public string FirstName { get; set; }
	
		/// <summary>
        /// LastName
        /// </summary>
		[Required]
		public string LastName { get; set; }



		///// <summary>
		///// 是否存在系统用户表中
		///// </summary>
		//[Required]
		//public bool IsExist { get; set; }


		public string OrganizationName { get; set; }=String.Empty;


		public  bool IsSystemUser{ get; set; }


		public Guid SystemUserId { get; set; }

		[JsonIgnore]
		public User SystemUser { get; set; }

		public bool IsJoin { get; set; }




		public DateTime? ExpireTime { get; set; }

        public DateTime? ConfirmTime { get; set; }

        public string RejectReason { get; set; }

		/// <summary>
		/// 邀请状态
		/// </summary>
		[Required]
		public TrialExternalUserStateEnum InviteState { get; set; } = TrialExternalUserStateEnum.WaitSent;

	}

}	 
