using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;

namespace IRaCIS.Core.Domain.Models
{
    public class TrialSite : Entity, IAuditAdd, IAuditUpdate,ISoftDelete
    {

        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 Guid CreateUserId { get; set; }
        public DateTime CreateTime { get; set; }
        public Guid UpdateUserId { get; set; }
        public DateTime UpdateTime { get; set; }

        public bool IsDeleted { get; set; }
        public DateTime? DeletedTime { get; set; }

        public Guid? DeleteUserId { get; set; }

        [JsonIgnore]
        //导航属性  
        [ForeignKey("SiteId")]
        public Site Site { get; set; }
        [JsonIgnore]
        [ForeignKey("TrialId")]
        public Trial Trial { get; set; }



        /// <summary>
        /// Site 下面有多个检查批次记录
        /// </summary>
        [JsonIgnore]
        public List<SubjectVisit> SubjectVisitList { get; set; }
        [JsonIgnore]
        public List<TrialSiteSurvey> TrialSiteSurveyList { get; set; }


        //Site 由多个人负责
        [JsonIgnore]
        public List<TrialSiteUser> CRCUserList { get; set; }

        [JsonIgnore]
        public List<Subject> SubjectList { get; set; }
        [JsonIgnore]
        public List<DicomStudy> StudyList { get; set; }
        [JsonIgnore]
        public List<NoneDicomStudy> NoneDicomStudyList { get; set; }

        [JsonIgnore]
        public  List<StudyMonitor> StudyMonitorList { get; set; }

        [JsonIgnore]
        public List<ReadingPeriodSite> ReadingPeriodSites { get; set; }
    }
}