//--------------------------------------------------------------------
//     此代码由T4模板自动生成  byzhouhang 20210918
//	   生成时间 2022-06-10 11:59:27 
//     对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
using System;
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Collections.Generic;
using System.ComponentModel;

namespace IRaCIS.Core.Domain.Models
{

    [Description("受试者某标准阅片用户中间关系表")]
    [Table("SubjectUser")]
    public class SubjectUser : BaseFullAuditEntity
    {

        #region 导航属性
        [JsonIgnore]
        public Trial Trial { get; set; }

        [JsonIgnore]
        //Parent
        [ForeignKey("ReplacedSubjectUserId")]
        public SubjectUser ReplacedSubjectUser { get; set; }

        //ChildList
        [JsonIgnore]
        public List<SubjectUser> EarlierSubjectUserList { get; set; }


        [JsonIgnore]
        public User DoctorUser { get; set; }

        [JsonIgnore]
        public Subject Subject { get; set; }
        #endregion

        public Guid TrialId { get; set; }

        public Guid TrialReadingCriterionId { get; set; }

        public DateTime? AssignTime { get; set; }

        public Guid SubjectId { get; set; }


        public Guid DoctorUserId { get; set; }


        public Arm ArmEnum { get; set; }

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

        //该属性有值 说明该医生被替换了 分配的时候 要过滤掉
        public Guid? ReplacedSubjectUserId { get; set; }



    }

}