//--------------------------------------------------------------------
//     此代码由T4模板自动生成  byzhouhang 20210918
//	   生成时间 2021-12-23 13:21:04 
//     对此文件的更改可能会导致不正确的行为，并且如果重新生成代码，这些更改将会丢失。
//--------------------------------------------------------------------
using IRaCIS.Core.Domain.Share;
using Newtonsoft.Json;

namespace IRaCIS.Core.Application.Contracts
{
    /// <summary> TrialSiteUserSurveyView  列表视图模型 </summary>
    public class TrialSiteUserSurveyView: TrialSiteUserSurveyAddOrEdit
    {
        public bool IsGenerateSuccess { get; set; }
        public DateTime CreateTime { get; set; }
        public Guid CreateUserId { get; set; }
        public DateTime UpdateTime { get; set; }
        public Guid UpdateUserId { get; set; }
       
        public string UserType { get; set; } = string.Empty;

        [JsonIgnore]
        public TrialSiteUserStateEnum InviteState { get; set; }

        public DateTime? ExpireTime { get; set; }

        public bool? IsJoin { get; set; }

        public DateTime? ConfirmTime { get; set; }

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


        public TrialSiteUserStateEnum State
        {
            get
            {
                if (InviteState == TrialSiteUserStateEnum.HasSend && ExpireTime != null && ExpireTime < DateTime.Now)
                {
                    return TrialSiteUserStateEnum.OverTime;
                }
                else
                {
                    return InviteState;
                }
            }
        }

        public string TrialRoleName { get; set; }

        public Guid? SystemUserId { get; set; }

    }


    public class UserInfoBasic
    {
        public Guid Id { get; set; }
        public string RealName { get; set; } = string.Empty;
        public string UserName { get; set; } = string.Empty;
    }


    ///<summary>TrialSiteUserSurveyQuery  列表查询参数模型</summary>
    public class TrialSiteUserSurveyQuery
    {

        public Guid TrialSiteSurveyId { get; set; }

        /////<summary> UserName</summary>
        //public string Name { get; set; }

        /////<summary> Phone</summary>
        //public string Phone { get; set; }

        /////<summary> Email</summary>
        //public string Email { get; set; }

    }

    ///<summary> TrialSiteUserSurveyAddOrEdit  列表查询参数模型</summary>
    public class TrialSiteUserSurveyAddOrEdit
    {
        public Guid? Id { get; set; }
      
        public Guid TrialSiteSurveyId { get; set; }
        public Guid? UserTypeId { get; set; }
        public string FirstName { get; set; } = string.Empty;
        public string LastName { get; set; } = string.Empty;
        public string Phone { get; set; } = string.Empty;
        public string Email { get; set; } = string.Empty;
        public bool IsGenerateAccount { get; set; }
        public Guid TrialRoleNameId { get; set; }

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


    public class TrialSiteUserSurveyVerfyResult
    {
        public Guid TrialSiteUserSurveyId { get; set; }

        public List<string> ErroMsgList { get; set; } = new List<string>();
    }

}


