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

using IRaCIS.Application.Contracts;
using IRaCIS.Core.Application.Helper;
using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
namespace IRaCIS.Core.Application.Contracts
{

    public class TrialSurveyInitInfo
    {
        public Guid TrialId { get; set; }
        public string Sponsor { get; set; } = string.Empty;

        //研究方案号
        public string ResearchProgramNo { get; set; } = string.Empty;

        //实验名称
        public string ExperimentName { get; set; } = string.Empty;

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

        public Guid IndicationTypeId { get; set; }

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

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

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

        public string Modalitys { get; set; }

        public List<TrialSiteForSelect> TrialSiteSelectList { get; set; } = new List<TrialSiteForSelect>();

    }

    public class TrialSiteForSelect
    {
        public Guid TrialSiteId => Id;
        public Guid Id { get; set; }
        public Guid TrialId { get; set; }

        public Guid? SiteId { get; set; }

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

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


        public bool IsHaveSiteSurveyRecord { get; set; }
    }


    public class TrialSiteSimpleSelect
    {

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

    }

    public class LoginReturnDTO
    {
        public TrialSurveyInitInfo TrialInfo { get; set; } = new TrialSurveyInitInfo();

        public TrialSiteSurveyView TrialSiteSurvey { get; set; } = new TrialSiteSurveyView();

        public List<TrialSiteEquipmentSurveyView> TrialSiteEquipmentSurveyList { get; set; } = new List<TrialSiteEquipmentSurveyView>();

        public List<TrialSiteUserSurveyView> TrialSiteUserSurveyList { get; set; } = new List<TrialSiteUserSurveyView>();


        public TrialExtraConfig SiteSurveyFiledConfig { get; set; }
    }

    public class TrialSiteUserSurveyAllDTO : TrialSiteUserSurveyView
    {
        public TrialSiteSurveyView TrialSiteSurvey { get; set; }
    }


    public class TrialSiteUserSurveyExportQueryDto
    {
        [NotDefault]
        public Guid TrialId { get; set; }
        public Guid? TrialSiteId { get; set; }

        public Guid? UserTypeId { get; set; }


        public bool? IsGenerateAccount { get; set; }

        public TrialSiteUserStateEnum? State { get; set; }

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


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

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

    }


    public class TrialSiteUserSurveyAllQuery : PageInput
    {
        [NotDefault]
        public Guid TrialId { get; set; }
        public Guid? TrialSiteId { get; set; }

        public Guid? UserTypeId { get; set; }


        public bool? IsGenerateAccount { get; set; }
        public int? TrialRoleCode { get; set; }

        public TrialSiteUserStateEnum? State { get; set; }

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


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

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


    }


    /// <summary> TrialSiteSurveyView  列表视图模型 </summary>
    public class TrialSiteSurveyView : TrialSiteSurveyAddOrEdit
    {

        public string TrialSiteCode { get; set; } = String.Empty;
        public string TrialSiteAliasName { get; set; } = String.Empty;

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

        [DictionaryTranslate("YesOrNo")]
        public bool IsDeleted { get; set; }

        public DateTime CreateTime { get; set; }
        public Guid CreateUserId { get; set; }
        public DateTime UpdateTime { get; set; }
        public Guid UpdateUserId { get; set; }

        [DictionaryTranslate("ResearchRecord")]
        public TrialSiteSurveyEnum State { get; set; }

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

        public UserInfoBasic ReviewerUser { get; set; }
        public UserInfoBasic PreliminaryUser { get; set; }

        public Guid? PreliminaryUserId { get; set; }

        public Guid? ReviewerUserId { get; set; }


        public DateTime? PreliminaryTime { get; set; }

        public DateTime? ReviewerTime { get; set; }


        public CommonUploadRecordDto SiteSurveyFile { get; set; }

    }

    public class TrialSiteSurveySelectView
    {
        public Guid Id { get; set; }
        public TrialSiteSurveyEnum State { get; set; }
        public DateTime CreateTime { get; set; }
        public bool IsDeleted { get; set; }

        public string Phone { get; set; } = string.Empty;
        public string Email { get; set; } = string.Empty;

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

    }

    public class TrialSiteSurveySelectquery
    {
        public Guid TrialId { get; set; }

        public Guid TrialSiteId { get; set; }

        public Guid TrialSiteSurveyId { get; set; }
    }

    ///<summary>TrialSiteSurveyQuery  列表查询参数模型</summary>
    public class TrialSiteSurveyQuery
    {
        public Guid TrialId { get; set; }

        public Guid TrialSiteId { get; set; }

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

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

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

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

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

    }

    public class UseEmialGetDoctorInfoOutDto
    {
        public Guid DoctorId { get; set; }
    }

    public class UseEmialGetDoctorInfoInDto
    {
        public string EmailOrPhone { get; set; }

        public Guid? TrialId { get; set; }
    }

    public class VerifyEmialGetDoctorInfoInDto
    {
        public string VerificationCode { get; set; }

        public string EmailOrPhone { get; set; }

        public Guid? TrialId { get; set; }
    }

    /// <summary>
    /// 
    /// </summary>
    public class UseUserIDGetDoctorIDOutDto
    {
        public Guid? DoctorID { get; set; }
    }


    public class UseUserIDGetDoctorIDInDto
    {
        public Guid UserID { get; set; }
    }

    public class VerifyEmialGetDoctorInfoOutDto
    {
        public Guid? DoctorId { get; set; }

        public ReviewerInformationConfirmStatus? ReviewStatus { get; set; }

        public string Token { get; set; }
    }

    public class SendEmialVerifyCodeInDto
    {
        public string Email { get; set; } = string.Empty;
    }

    public class SiteSurveySendVerifyCode
    {
        //public VerifyType verificationType { get; set; }
        public string Email { get; set; } = string.Empty;

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

    }

    public class SendCheckSiteSurveyUserCommand
    {
        public string Email { get; set; } = string.Empty;

        public string FullName { get; set; }

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


    public class SendUpdateSiteSurveyUserCommand
    {

        public string Url { get; set; }

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

        public string FullName { get; set; }

        [NotDefault]
        public Guid TrialSiteId { get; set; }

    }

    public class LoginDto
    {
        public Guid TrialId { get; set; }

        public Guid TrialSiteId { get; set; }


        public bool IsUpdate { get; set; }


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

        public VerifyType verificationType { get; set; }
        public string EmailOrPhone { get; set; } = string.Empty;

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


    ///<summary> TrialSiteSurveyAddOrEdit  列表查询参数模型</summary>
    public class TrialSiteSurveyAddOrEdit
    {
        public Guid? Id { get; set; }
        public Guid TrialId { get; set; }
        public Guid TrialSiteId { get; set; }
        public string UserName { get; set; } = string.Empty;
        public string Phone { get; set; } = string.Empty;
        public string Email { get; set; } = string.Empty;

        public int AverageEngravingCycle { get; set; }

        [DictionaryTranslate("YesOrNo")]
        public bool IsConfirmImagingTechnologist { get; set; }
        public string NotConfirmReson { get; set; } = string.Empty;

        [DictionaryTranslate("EfficacyEvaluatorType")]
        public int EfficacyEvaluatorType { get; set; }

        [DictionaryTranslate("YesOrNo")]
        public bool IsFollowStudyParameters { get; set; }
        public string NotFollowReson { get; set; } = string.Empty;

        [DictionaryTranslate("YesOrNo")]
        [Comment("MRI-PDEE 是否为本中心该适应症的常规诊疗检查项目")]
        public bool? IsRoutineMRIPDEE { get; set; }

        [Comment("MRI-PDFF 单次检查时长")]
        public string MRIPDFFScanTime { get; set; }

        [Comment("MRI-PDFF 预约等待时长")]
        public string MRIPDFFLeadTime { get; set; }

        [Comment("MRI-PDEE 其他")]
        public string MRIPDFFOther { get; set; }

        [DictionaryTranslate("YesOrNo")]

        [Comment("是否授权影像科老师参与")]

        public bool? IsAuthorizeRadiologistsParticipate { get; set; }

        [DictionaryTranslate("YesOrNo")]
        [Comment("保持 1-2 名固定技师")]
        public bool? AssignFixedTechnologists { get; set; }

        [DictionaryTranslate("YesOrNo")]

        [Comment("是否严格按照影像手册参数完成刻盘")]
        public bool? ISStrictManualBurnFlag { get; set; }

        [Comment("不严格按照影像手册参数完成刻盘原因")]
        public string NotStrictManualBurnFlagReason { get; set; }

        public Guid? CommonUploadRecordId { get; set; }
    }


    public class TrialSiteSubmitBackCommand
    {
        [NotDefault]
        public Guid TrialId { get; set; }
        [NotDefault]
        public Guid TrialSiteSurveyId { get; set; }

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

        public string RouteUrl { get; set; }
    }

    public class InviteEmailCommand
    {
        [NotDefault]
        public Guid TrialId { get; set; }


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

        public List<TrialSiteUserSurveyView> UserList { get; set; } = new List<TrialSiteUserSurveyView>();
    }


    public class TrialSiteUserSurveyJoinCommand
    {
        [NotDefault]
        public Guid TrialId { get; set; }

        public Guid TrialSiteSurveyId { get; set; }

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

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

        public List<TrialSiteUserSurveyView> UserList { get; set; } = new List<TrialSiteUserSurveyView>();
    }


    public class TrialSiteSurvyeSubmitDTO
    {
        [NotDefault]
        public Guid TrialId { get; set; }
        [NotDefault]
        public Guid TrialSiteSurveyId { get; set; }


        public string BaseUrl { get; set; } = string.Empty;
        public string RouteUrl { get; set; } = string.Empty;
    }

    public class TrialSiteSurveyQueryDTO : PageInput
    {
        [NotDefault]
        public Guid TrialId { get; set; }

        public Guid? TrialSiteId { get; set; }

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



        public TrialSiteSurveyEnum? State { get; set; }

        public bool? IsDeleted { get; set; }

        public DateTime? UpdateTimeBegin { get; set; }

        public DateTime? UpdateTimeEnd { get; set; }

        public string? PreliminaryUserName { get; set; }

        public string? ReviewerUserName { get; set; }

    }

    public class CopyTrialSiteSurveyDTO
    {
        public Guid TrialSiteSurveyId { get; set; }
        public string UserName { get; set; } = string.Empty;
        public string Phone { get; set; } = string.Empty;
        public string Email { get; set; } = string.Empty;
    }


    public class SiteSurveyLogQuery:SortInput
    {
        [NotDefault]
        public Guid TrialSiteSurveyId { get; set; }

        public Guid? Id { get; set; }
    }

    public class SiteSurveyLogDTO
    {
        public Guid Id { get; set; }
        public Guid TrialSiteSurveyId { get; set; }

        public string Name { get; set; }

        public UserTypeEnum UserType { get; set; }

        public SiteSurveyOptTyp OptType { get; set; }

        public string Reason { get; set; }

        [MaxLength]
        public string Json { get; set; }

        [Comment("更新调研表之前的调研表")]
        public Guid? OriginTrialSiteSurveyId { get; set; }


        public string CreateTime { get; set; }
    }

    public class SiteSurveyEquipmentDto : TrialSiteEquipmentSurveyView
    {
        public string TrialSiteCode { get; set; }


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

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


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

        [DictionaryTranslate("YesOrNo")]
        public bool IsDeleted { get; set; }

        [DictionaryTranslate("ResearchRecord")]
        public TrialSiteSurveyEnum State { get; set; }
    }

    public class SiteSurveyEquipmentQuery : PageInput
    {
        [NotDefault]
        public Guid TrialId { get; set; }

        public Guid? TrialSiteId { get; set; }
        public string? TrialSiteCode { get; set; }

        public string? TrialSiteName { get; set; }

        public bool? IsDeleted { get; set; }

        public TrialSiteSurveyEnum? State { get; set; }
    }

    public class SiteSurveyInfoQuery : PageInput
    {
        [NotDefault]
        public Guid TrialId { get; set; }

        public Guid? TrialSiteId { get; set; }

        public string? TrialSiteCode { get; set; }

        public string? TrialSiteName { get; set; }

        public bool? IsDeleted { get; set; }

        public TrialSiteSurveyEnum? State { get; set; }
    }

    public class SiteSurveyInfoDto
    {

    }
}

