
//--------------------------------------------------------------------
//     此代码由T4模板自动生成  byzhouhang 20210918
//	   生成时间 2021-12-23 13:16:57 
//     对此文件的更改可能会导致不正确的行为，并且如果重新生成代码，这些更改将会丢失。
using IRaCIS.Core.Domain.Share;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Domain.Models
{
    ///<summary>
    ///TrialSiteUserSurvey
    ///</summary>
    [Table("TrialSiteUserSurvey")]
    public class TrialSiteUserSurvey : Entity, IAuditUpdate, IAuditAdd
    {
        [JsonIgnore]
        [ForeignKey("TrialSiteSurveyId")]
        public TrialSiteSurvey TrialSiteSurvey { get; set; }

        public Guid TrialSiteSurveyId { get; set; }

        [JsonIgnore]
        [ForeignKey("UserTypeId")]
        public UserType UserTypeRole { get; set; }

        public Guid? UserTypeId { get; set; }


        public Guid TrialRoleNameId { get; set; }

        public Dictionary TrialRoleName { 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; }

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

        /// <summary>
        /// Phone
        /// </summary>
        [Required]
        public string Phone { get; set; } = string.Empty;

        /// <summary>
        /// Email
        /// </summary>
        [Required]
        public string Email { get; set; } = string.Empty;



        public string FirstName { get; set; } = string.Empty;
        public string LastName { get; set; } = string.Empty;



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

        public Guid? SystemUserId { get; set; }


        public DateTime? ExpireTime { get; set; }

        public bool IsJoin { get; set; }

        public DateTime? ConfirmTime { get; set; }

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

        /// <summary>
        /// IsGenerateAccount
        /// </summary>
        [Required]
        public bool IsGenerateAccount { get; set; }

        public bool IsGenerateSuccess { get; set; }


        public TrialSiteUserStateEnum InviteState { get; set; } = TrialSiteUserStateEnum.WaitSent;

       


    }

}
