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

        public DateTime CreateTime { get; set; }

        public Guid CreateUserId { get; set; }

        //可能是Dicom  也可能是非Dicom  该字段废弃
        public Guid StudyId { get; set; }


        public DateTime UploadStartTime { get; set; }


        public DateTime? UploadFinishedTime { get; set; }


        public DateTime? ArchiveFinishedTime { get; set; }

        public int FailedFileCount { get; set; }


        public decimal FileSize { get; set; }

        public string IP { get; set; }


        public bool IsDicomReUpload { get; set; }

        public bool IsDicom { get; set; }

        public  int FileCount { get; set; }

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


        public  Guid TrialId { get; set; }

        public Guid SiteId { get; set; }

        public Guid SubjectId { get; set; }

        public Guid SubjectVisitId { get; set; }

        [JsonIgnore]
        [ForeignKey("SubjectId")]
        public Subject Subject { get; set; }

        [JsonIgnore]
        [ForeignKey("SubjectVisitId")]
        public SubjectVisit SubjectVisit { get; set; }

        [JsonIgnore]
        public TrialSite TrialSite { get; set; }
        [JsonIgnore]
        [ForeignKey("SiteId")]
        public Site Site { get; set; }
        [JsonIgnore]
        [ForeignKey("TrialId")]
        public Trial Trial { get; set; }
        [JsonIgnore]
        [ForeignKey("CreateUserId")]
        public User Uploader { get; set; }


        public bool IsSuccess { get; set; }

        public string Note = string.Empty;

    }

}
