using IRaCIS.Core.Domain.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IRaCIS.Core.Domain.Models;

/// <summary>
/// 文件类型
/// </summary>
public enum ArchiveType
{
    /// <summary>
    /// 报告
    /// </summary>
    Report = 1,

    /// <summary>
    /// 文档
    /// </summary>
    Doc = 2,

    /// <summary>
    /// 记录
    /// </summary>
    Record = 3,

    /// <summary>
    /// 阅片人
    /// </summary>
    Reviewer = 4,

    /// <summary>
    /// 模板
    /// </summary>
    Template = 5,

}

/// <summary>
/// 文档模板
/// </summary>
public enum SysTemplateType
{
    /// <summary>
    /// Elevate
    /// </summary>
    Elevate = 1,

    /// <summary>
    /// Extensive
    /// </summary>
    Extensive = 2,

    /// <summary>
    /// Both
    /// </summary>
    Both = 3,

}



/// <summary>
/// 文档子类标识
/// </summary>
public enum SubIdentification
{
    /// <summary>
    /// 报告
    /// </summary>
    Report = 0,

    /// <summary>
    /// 文档
    /// </summary>
    Doc = 1,

    /// <summary>
    /// 一般文件记录
    /// </summary>
    GeneralFile = 2,

    /// <summary>
    /// 系统数据记录
    /// </summary>
    SystemDataRecord = 3,

    /// <summary>
    /// 培训记录
    /// </summary>
    Train = 4,

    /// <summary>
    /// 系统数据
    /// </summary>
    SystemData = 5,

}


/// <summary>
/// 文件类型表 就是5类里面的各个小项 如( 报告里面的  项目总结报告,一致性分析报告......   文档里面的 项目合同.......)
/// </summary>
[Comment("后台 - 系统文件类型表")]
[Table("SysFileType")]
public class SysFileType : BaseFullAuditEntity
{

    [Comment("报告、文档、记录")]
    public ArchiveType ArchiveTypeEnum { get; set; }

    public string Name { get; set; }

    public string NameCN { get; set; }

    [Comment("是否确认收入项")]
    public bool IsConfirmRecord { get; set; }


    [Comment("子类标识，是取那个表的数据")]
    public SubIdentification SubIdentificationEnum { get; set; }

    public bool IsEnable { get; set; }

    /// <summary>
    /// 显示顺序    
    /// </summary>
    public int ShowOrder { get; set; }

    /// <summary>
    /// 文档类型
    /// </summary>
    public SysTemplateType SysTemplateTypeEnum { get; set; } = SysTemplateType.Extensive;

}


/// <summary>
/// 文件类型表 就是5类里面的各个小项 如( 报告里面的  项目总结报告,一致性分析报告......   文档里面的 项目合同.......)
/// </summary>
[Comment("项目文件 - 文件类型表")]
[Table("TrialFileType")]
public class TrialFileType : BaseFullAuditEntity
{

    [Comment("关联系统文件类型")]
    public Guid? SysFileTypeId { get; set; }

    public Guid TrialId { get; set; }

    [Comment("报告、文档、记录")]
    public ArchiveType ArchiveTypeEnum { get; set; }

    public string Name { get; set; }

    public string NameCN { get; set; }

    [Comment("是否确认收入项")]
    public bool IsConfirmRecord { get; set; }

    [Comment("首次定稿日期")]
    public DateOnly? FirstFinalDate { get; set; }

    [Comment("是否自定义")]
    public bool IsSelfDefine { get; set; }


    [Comment("子类标识，是取那个表的数据")]
    public SubIdentification SubIdentificationEnum { get; set; }

    public bool IsEnable { get; set; }

    /// <summary>
    /// 显示顺序    
    /// </summary>
    public int ShowOrder { get; set; }


    [Comment("文件Id")]
    public Guid? FileRecordId { get; set; }

}
