269 lines
		
	
	
		
			6.0 KiB
		
	
	
	
		
			C#
		
	
	
			
		
		
	
	
			269 lines
		
	
	
		
			6.0 KiB
		
	
	
	
		
			C#
		
	
	
using IRaCIS.Core.Domain.Models;
 | 
						||
using MassTransit.Futures.Contracts;
 | 
						||
using System;
 | 
						||
using System.Collections.Generic;
 | 
						||
using System.Linq;
 | 
						||
using System.Text;
 | 
						||
using System.Threading.Tasks;
 | 
						||
 | 
						||
namespace IRaCIS.Core.Domain.Models;
 | 
						||
 | 
						||
[Comment("项目文件 - 定稿记录表")]
 | 
						||
[Table("TrialFinalRecord")]
 | 
						||
public class TrialFinalRecord : BaseFullAuditEntity
 | 
						||
{
 | 
						||
 | 
						||
    #region 文件
 | 
						||
    /// <summary>
 | 
						||
    /// 定稿PDF
 | 
						||
    /// </summary>
 | 
						||
    [JsonIgnore]
 | 
						||
    [ForeignKey("PDFFileRecordId")]
 | 
						||
    public TrialFile PDFFileRecord { get; set; }
 | 
						||
 | 
						||
    /// <summary>
 | 
						||
    /// 定稿Word
 | 
						||
    /// </summary>
 | 
						||
    [JsonIgnore]
 | 
						||
    [ForeignKey("WordFileRecordId")]
 | 
						||
    public TrialFile WordFileRecord { get; set; }
 | 
						||
 | 
						||
    /// <summary>
 | 
						||
    /// 签名页
 | 
						||
    /// </summary>
 | 
						||
    [JsonIgnore]
 | 
						||
    [ForeignKey("SignFileRecordId")]
 | 
						||
    public TrialFile SignFileRecord { get; set; }
 | 
						||
 | 
						||
    /// <summary>
 | 
						||
    /// 历史记录
 | 
						||
    /// </summary>
 | 
						||
    [JsonIgnore]
 | 
						||
    [ForeignKey("HistoryFileRecordId")]
 | 
						||
    public TrialFile HistoryFileRecord { get; set; }
 | 
						||
 | 
						||
 | 
						||
    /// <summary>
 | 
						||
    /// 历史记录
 | 
						||
    /// </summary>
 | 
						||
    [JsonIgnore]
 | 
						||
    public List<TrialHistoryRecordFile> TrialHistoryRecordFileList { get; set; }
 | 
						||
 | 
						||
    #endregion
 | 
						||
 | 
						||
 | 
						||
 | 
						||
 | 
						||
 | 
						||
    public Guid TrialId { get; set; }
 | 
						||
 | 
						||
    [Comment("关联项目文件类型")]
 | 
						||
    public Guid TrialFileTypeId { get; set; }
 | 
						||
 | 
						||
 | 
						||
    public string Name { get; set; }
 | 
						||
 | 
						||
    public string Version { get; set; }
 | 
						||
 | 
						||
 | 
						||
    #region 文件控制
 | 
						||
    public int State { get; set; }
 | 
						||
 | 
						||
    [Comment("是否授权查看")]
 | 
						||
    public bool IsAuthorizedView { get; set; }
 | 
						||
    #endregion
 | 
						||
 | 
						||
 | 
						||
    [Comment("定稿PDF")]
 | 
						||
    public Guid? PDFFileRecordId { get; set; }
 | 
						||
 | 
						||
    [Comment("定稿Word")]
 | 
						||
    public Guid? WordFileRecordId { get; set; }
 | 
						||
 | 
						||
    [Comment("签名页")]
 | 
						||
    public Guid? SignFileRecordId { get; set; }
 | 
						||
 | 
						||
    [Comment("历史记录")]
 | 
						||
    public Guid? HistoryFileRecordId { get; set; }
 | 
						||
 | 
						||
 | 
						||
}
 | 
						||
 | 
						||
 | 
						||
 | 
						||
[Comment("项目文件 - 一般文件记录表")]
 | 
						||
[Table("TrialNormalRecord")]
 | 
						||
public class TrialNormalRecord : BaseFullAuditEntity
 | 
						||
{
 | 
						||
    public Guid TrialId { get; set; }
 | 
						||
 | 
						||
    /// <summary>
 | 
						||
    /// 历史记录
 | 
						||
    /// </summary>
 | 
						||
    [JsonIgnore]
 | 
						||
    public List<TrialHistoryRecordFile> TrialHistoryRecordFileList { get; set; }
 | 
						||
 | 
						||
    /// <summary>
 | 
						||
    /// 一般文件记录
 | 
						||
    /// </summary>
 | 
						||
    [JsonIgnore]
 | 
						||
    [ForeignKey("TrialFileRecordId")]
 | 
						||
    public TrialFile TrialFileRecord { get; set; }
 | 
						||
 | 
						||
    /// <summary>
 | 
						||
    /// 历史文件记录
 | 
						||
    /// </summary>
 | 
						||
    [JsonIgnore]
 | 
						||
    [ForeignKey("HistoryFileRecordId")]
 | 
						||
    public TrialFile HistoryFileRecord { get; set; }
 | 
						||
 | 
						||
    [Comment("关联项目文件类型")]
 | 
						||
    public Guid TrialFileTypeId { get; set; }
 | 
						||
 | 
						||
 | 
						||
    #region 文件控制
 | 
						||
    public int State { get; set; }
 | 
						||
 | 
						||
    [Comment("是否授权查看")]
 | 
						||
    public bool IsAuthorizedView { get; set; }
 | 
						||
    #endregion
 | 
						||
 | 
						||
 | 
						||
    [Comment("关联具体的文件记录,记录里面有大小,格式,名称")]
 | 
						||
    public Guid? TrialFileRecordId { get; set; }
 | 
						||
 | 
						||
    [Comment("历史文件")]
 | 
						||
    public Guid? HistoryFileRecordId { get; set; }
 | 
						||
 | 
						||
 | 
						||
 | 
						||
}
 | 
						||
 | 
						||
 | 
						||
[Comment("项目文件 - 培训记录表")]
 | 
						||
[Table("TrialTrianingRecord")]
 | 
						||
public class TrialTrianingRecord : BaseFullAuditEntity
 | 
						||
{
 | 
						||
    public Guid TrialId { get; set; }
 | 
						||
 | 
						||
    /// <summary>
 | 
						||
    /// 一般文件记录
 | 
						||
    /// </summary>
 | 
						||
    [JsonIgnore]
 | 
						||
    [ForeignKey("TrialFileRecordId")]
 | 
						||
    public TrialFile TrialFileRecord { get; set; }
 | 
						||
 | 
						||
 | 
						||
    /// <summary>
 | 
						||
    /// 历史记录
 | 
						||
    /// </summary>
 | 
						||
    [JsonIgnore]
 | 
						||
    public List<TrialHistoryRecordFile> TrialHistoryRecordFileList { get; set; }
 | 
						||
 | 
						||
    /// <summary>
 | 
						||
    /// 历史文件记录
 | 
						||
    /// </summary>
 | 
						||
    [JsonIgnore]
 | 
						||
    [ForeignKey("HistoryFileRecordId")]
 | 
						||
    public TrialFile HistoryFileRecord { get; set; }
 | 
						||
 | 
						||
    [Comment("关联项目文件类型")]
 | 
						||
    public Guid TrialFileTypeId { get; set; }
 | 
						||
 | 
						||
    #region 培训记录相关字段
 | 
						||
    public DateOnly? TrianingDate { get; set; }
 | 
						||
 | 
						||
    public int? TrianingCount { get; set; }
 | 
						||
 | 
						||
    [Comment("培训效果")]
 | 
						||
    public string? TrianingState { get; set; }
 | 
						||
 | 
						||
    #endregion
 | 
						||
 | 
						||
    #region 文件控制
 | 
						||
    public int? State { get; set; }
 | 
						||
 | 
						||
    [Comment("是否授权查看")]
 | 
						||
    public bool IsAuthorizedView { get; set; }
 | 
						||
 | 
						||
    #endregion
 | 
						||
 | 
						||
    [Comment("关联具体的文件记录,记录里面有大小,格式,名称")]
 | 
						||
    public Guid? TrialFileRecordId { get; set; }
 | 
						||
 | 
						||
 | 
						||
    [Comment("历史文件")]
 | 
						||
    public Guid? HistoryFileRecordId { get; set; }
 | 
						||
 | 
						||
    public string Note { get; set; } = string.Empty;
 | 
						||
 | 
						||
}
 | 
						||
 | 
						||
[Comment("项目文件 - 文件表")]
 | 
						||
[Table("TrialFile")]
 | 
						||
public class TrialFile : BaseFullAuditEntity
 | 
						||
{
 | 
						||
    /// <summary>
 | 
						||
    /// TrialFinalRecord
 | 
						||
    /// </summary>
 | 
						||
    [JsonIgnore]
 | 
						||
    [ForeignKey("TrialFileTypeId")]
 | 
						||
    public TrialFileType TrialFileType { get; set; }
 | 
						||
 | 
						||
    [Comment("关联项目文件类型")]
 | 
						||
    public Guid TrialFileTypeId { get; set; }
 | 
						||
 | 
						||
    public string FileName { get; set; }
 | 
						||
 | 
						||
    [StringLength(1000)]
 | 
						||
    public string FilePath { get; set; }
 | 
						||
 | 
						||
    public string FileSize { get; set; }
 | 
						||
 | 
						||
    public string FileFormat { get; set; }
 | 
						||
}
 | 
						||
 | 
						||
/// <summary>
 | 
						||
/// 项目历史记录文件表
 | 
						||
/// </summary>
 | 
						||
public class TrialHistoryRecordFile : BaseFullAuditEntity
 | 
						||
{
 | 
						||
    #region MyRegion
 | 
						||
    /// <summary>
 | 
						||
    /// TrialFinalRecord
 | 
						||
    /// </summary>
 | 
						||
    [JsonIgnore]
 | 
						||
    [ForeignKey("TrialFileTypeId")]
 | 
						||
    public TrialFileType TrialFileType { get; set; }
 | 
						||
 | 
						||
    [JsonIgnore]
 | 
						||
    [ForeignKey("TrialRecordId")]
 | 
						||
    public TrialFinalRecord? TrialFinalRecord { get; set; }
 | 
						||
 | 
						||
    [JsonIgnore]
 | 
						||
    [ForeignKey("TrialRecordId")]
 | 
						||
    public TrialNormalRecord? TrialNormalRecord { get; set; }
 | 
						||
 | 
						||
    [JsonIgnore]
 | 
						||
    [ForeignKey("TrialRecordId")]
 | 
						||
    public TrialTrianingRecord? TrialTrianingRecord { get; set; }
 | 
						||
    #endregion
 | 
						||
 | 
						||
    /// <summary>
 | 
						||
    /// 项目记录Id   (TrialFinalRecord,TrialNormalRecord,TrialTrianingRecord)
 | 
						||
    /// </summary>
 | 
						||
    public Guid TrialRecordId { get; set; }
 | 
						||
 | 
						||
    [Comment("关联项目文件类型")]
 | 
						||
    public Guid TrialFileTypeId { get; set; }
 | 
						||
 | 
						||
    public string FileName { get; set; }
 | 
						||
 | 
						||
    [StringLength(1000)]
 | 
						||
    public string FilePath { get; set; }
 | 
						||
 | 
						||
    public string FileSize { get; set; }
 | 
						||
 | 
						||
    public string FileFormat { get; set; }
 | 
						||
}
 |