using IRaCIS.Core.Domain.Share;
using System.ComponentModel;

namespace IRaCIS.Core.Domain.Models;

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

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

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

    [JsonIgnore]
    public List<SubjectUser> EarlierSubjectUserList { get; set; }
    [JsonIgnore]
    public UserRole 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;

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

