using IRaCIS.Core.Infrastructure.Extention;
using System.ComponentModel.DataAnnotations;

namespace IRaCIS.Application.Contracts
{
    public class VisitStageSelectDTO
    {
        public Guid Id { get; set; }

        public decimal VisitNum { get; set; }

        public string VisitName { get; set; } = String.Empty;
        public int VisitDay { get; set; }


        public bool IsBaseLine { get; set; } = false;

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

        public int VisitWindowLeft { get; set; }
        public int VisitWindowRight { get; set; }
    }

    public class VisitStageDTO : VisitPlanCommand
    {
        public DateTime CreateTime { get; set; }

        public bool IsHaveFirstConfirmed { get; set; }

    }

    public class VisitPlanView
    {
        public List<VisitStageDTO> VisitPlanList = new List<VisitStageDTO>();

        public decimal TimePointsPerPatient { get; set; }
        public bool VisitPlanConfirmed { get; set; }

        public bool IsHaveFirstGiveMedicineDate { get; set; } = true;

        public string BlindBaseLineName { get; set; }

        public string BlindFollowUpPrefix { get; set; }

        public bool IsHaveGeneratedTask { get; set; }
    }


    public class VisitBlindNameCommand
    {
        [NotDefault]
        public Guid TrialId { get; set; }
        public string BlindBaseLineName { get; set; }

        public string BlindFollowUpPrefix { get; set; }
    }



    public class VisitPlanCommand
    {
        //public string BlindName => "B" + (VisitNum * 10).ToString("D3");

        public string BlindName { get; set; } = String.Empty;
        public bool IsConfirmed { get; set; } = false;

        public Guid? Id { get; set; }
        public Guid TrialId { get; set; }

        public decimal VisitNum { get; set; }
        public string VisitName { get; set; } = String.Empty;
        public int VisitDay { get; set; }
        public string Description { get; set; } = String.Empty;
        public bool NeedGlobal { get; set; } = false;

        public bool IsBaseLine { get; set; } = false;


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

        public int VisitWindowLeft { get; set; }
        public int VisitWindowRight { get; set; }

        public bool IsDeleted { get; set; }
    }


    public class VisitPlanQueryDTO : PageInput
    {
        public Guid TrialId { get; set; } = Guid.Empty;
        public string Keyword { get; set; } = string.Empty;
    }

    public class VisitPlanInfluenceSubjectVisitStatDTO
    {
        public Guid Id { get; set; }
        public Guid CreateUserId { get; set; }

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

        public DateTime CreateTime { get; set; }

        public int InconsistentCount { get; set; }
    }

  
}
