diff --git a/IRaCIS.Core.Domain/Dcotor/DoctorCriterionFile.cs b/IRaCIS.Core.Domain/Dcotor/DoctorCriterionFile.cs index 5a5edecf4..2b9f421ab 100644 --- a/IRaCIS.Core.Domain/Dcotor/DoctorCriterionFile.cs +++ b/IRaCIS.Core.Domain/Dcotor/DoctorCriterionFile.cs @@ -7,64 +7,43 @@ using System; using IRaCIS.Core.Domain.Share; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace IRaCIS.Core.Domain.Models +using Microsoft.EntityFrameworkCore; +namespace IRaCIS.Core.Domain.Models; + +[Comment("医生 - 项目标准签名文档")] +[Table("DoctorCriterionFile")] +public class DoctorCriterionFile : BaseAddAuditEntity { - /// - ///DoctorCriterionFile - /// - [Table("DoctorCriterionFile")] - public class DoctorCriterionFile :BaseAddAuditEntity - { - #region 导航属性 - [JsonIgnore] - [ForeignKey("DoctorId")] - public Doctor Doctor { get; set; } - #endregion - /// - /// 文件名称 - /// - public string FileName { get; set; } = string.Empty; + #region 导航属性 + [JsonIgnore] + [ForeignKey("DoctorId")] + public Doctor Doctor { get; set; } + #endregion - /// - /// 文件路径 - /// - public string FilePath { get; set; } = string.Empty; + public string CriterionName { get; set; } = null!; - /// - /// 标准类型 - /// - public CriterionType CriterionType { get; set; } - - /// - /// 医生Id - /// - public Guid DoctorId { get; set; } - - /// - /// 备注 - /// - public string Remark { get; set; } = string.Empty; + [Comment("标准类型")] + public CriterionType CriterionType { get; set; } - /// - /// 文件类型 - /// - public CriterionFileType FileType { get; set; } - + public Guid DoctorId { get; set; } + + [StringLength(400)] + public string FileName { get; set; } = null!; + + [StringLength(4000)] + public string FilePath { get; set; } = null!; + + public CriterionFileType FileType { get; set; } + + public bool IsEnable { get; set; } + + public string Remark { get; set; } = null!; + + public Guid? TrialId { get; set; } + + public Guid? TrialReadingCriterionId { get; set; } + +} - /// - /// 是否启用 - /// - public bool IsEnable { get; set; } = true; - - - public string CriterionName { get; set; } = string.Empty; - public Guid? TrialReadingCriterionId { get; set; } - public Guid? TrialId { get; set; } - - - } - - -} diff --git a/IRaCIS.Core.Domain/Trial/DataInspection.cs b/IRaCIS.Core.Domain/Trial/DataInspection.cs index 7d6dc9255..d0422ccb9 100644 --- a/IRaCIS.Core.Domain/Trial/DataInspection.cs +++ b/IRaCIS.Core.Domain/Trial/DataInspection.cs @@ -29,23 +29,23 @@ public class DataInspection : BaseAddAuditEntity public Guid? ChildrenTypeId { get; set; } [Comment(" 创建人姓名")] - public string CreateUserName { get; set; } = null!; + public string CreateUserName { get; set; } = string.Empty; - public string CreateUserRealName { get; set; } = null!; + public string CreateUserRealName { get; set; } = string.Empty; [Comment(" 阅片医生")] public Guid? DoctorUserId { get; set; } [Comment(" 被稽查实体名")] - public string EntityName { get; set; } = null!; + public string EntityName { get; set; } = string.Empty; [Comment(" 要稽查对象Id")] public Guid? GeneralId { get; set; } [Comment(" 标识")] - public string Identification { get; set; } = null!; + public string Identification { get; set; } = string.Empty; - public string IP { get; set; } = null!; + public string IP { get; set; } = string.Empty; [Comment(" 是否是前端添加")] public bool? IsFrontAdd { get; set; } @@ -75,10 +75,10 @@ public class DataInspection : BaseAddAuditEntity [Comment(" 父ID")] public Guid? ParentId { get; set; } - public string Reason { get; set; } = null!; + public string Reason { get; set; } = string.Empty; [Comment(" 角色名称")] - public string RoleName { get; set; } = null!; + public string RoleName { get; set; } = string.Empty; public Guid? SignId { get; set; } diff --git a/IRaCIS.Core.Infra.EFCore/Interceptor/AuditEntityInterceptor.cs b/IRaCIS.Core.Infra.EFCore/Interceptor/AuditEntityInterceptor.cs index 3ec49f294..2ea86c02c 100644 --- a/IRaCIS.Core.Infra.EFCore/Interceptor/AuditEntityInterceptor.cs +++ b/IRaCIS.Core.Infra.EFCore/Interceptor/AuditEntityInterceptor.cs @@ -50,7 +50,8 @@ public class AuditEntityInterceptor(IUserInfo _userInfo, ILogger (u.State == EntityState.Modified || u.State == EntityState.Added)) - .Where(x => !typeof(DataInspection).IsAssignableFrom(x.Entity.GetType())).ToList()) + //.Where(x => !typeof(DataInspection).IsAssignableFrom(x.Entity.GetType())) + .ToList()) { // 检查属性是否为string类型,并且值为null foreach (var property in entry.Properties.Where(t=>t.Metadata.ClrType==typeof(string) && t.CurrentValue == null))