namespace IRaCIS.Core.Domain.Models;

[Comment("项目 - 项目文档")]
[Table("TrialDocument")]
public class TrialDocument : BaseFullDeleteAuditEntity
{
    #region 导航属性
    [JsonIgnore]
    public List<TrialDocConfirmedIdentityUser> TrialDocConfirmedUserList { get; set; }
    [JsonIgnore]
    public List<TrialDocNeedConfirmedUserType> NeedConfirmedUserTypeList { get; set; }
    [JsonIgnore]
    public Trial Trial { get; set; }


    [JsonIgnore]
    public List<TrialDocumentAttachment> TrialDocumentAttachmentList { get; set; }

    [JsonIgnore]
    [ForeignKey("FileTypeId")]
    public Dictionary FileType { get; set; }
    #endregion
    [Comment("需要确认的项目用户 通过TrialId 关联 用中间表过滤")]
    public Guid FileTypeId { get; set; }

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

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

    public Guid TrialId { get; set; }

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

    public int SignViewMinimumMinutes { get; set; }


    /// <summary>
    /// 现有员工培训天数
    /// </summary>
    public int? CurrentStaffTrainDays { get; set; }


    /// <summary>
    /// 新员工培训天数
    /// </summary>
    public int? NewStaffTrainDays { get; set; }

    /// <summary>
    /// 是否发布
    /// </summary>

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

    /// <summary>
    /// 发布时间
    /// </summary>
    public DateTime? PublishDate { get; set; }
}

[Comment("项目签署文档附件")]
[Table("TrialDocumentAttachment")]
public class TrialDocumentAttachment : BaseFullAuditEntity
{
    [JsonIgnore]
    [ForeignKey("TrialDocumentId")]
    public TrialDocument TrialDocument { get; set; }

    /// <summary>
    /// 项目文档Id
    /// </summary>
    public Guid TrialDocumentId { get; set; }

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

    /// <summary>
    /// 文件名称
    /// </summary>
    public string FileName { get; set; } = string.Empty;

    /// <summary>
    /// 是否下线
    /// </summary>
    public bool OffLine { get; set; }

    /// <summary>
    /// 文件路径
    /// </summary>
    [StringLength(1000)]
    public string FilePath { get; set; } = string.Empty;

    /// <summary>
    /// 文件大小
    /// </summary>
    public decimal? FileSize { get; set; }

    /// <summary>
    /// 文件类型
    /// </summary>
    public string FileFormat { get; set; } = string.Empty;
}

