稽查实体给默认值
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
b98df9dae8
commit
b5d117f6fa
|
@ -7,64 +7,43 @@ using System;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
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
|
||||||
{
|
{
|
||||||
///<summary>
|
#region 导航属性
|
||||||
///DoctorCriterionFile
|
[JsonIgnore]
|
||||||
///</summary>
|
[ForeignKey("DoctorId")]
|
||||||
[Table("DoctorCriterionFile")]
|
public Doctor Doctor { get; set; }
|
||||||
public class DoctorCriterionFile :BaseAddAuditEntity
|
#endregion
|
||||||
{
|
|
||||||
#region 导航属性
|
|
||||||
[JsonIgnore]
|
|
||||||
[ForeignKey("DoctorId")]
|
|
||||||
public Doctor Doctor { get; set; }
|
|
||||||
#endregion
|
|
||||||
/// <summary>
|
|
||||||
/// 文件名称
|
|
||||||
/// </summary>
|
|
||||||
public string FileName { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
public string CriterionName { get; set; } = null!;
|
||||||
/// 文件路径
|
|
||||||
/// </summary>
|
|
||||||
public string FilePath { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
[Comment("标准类型")]
|
||||||
/// 标准类型
|
public CriterionType CriterionType { get; set; }
|
||||||
/// </summary>
|
|
||||||
public CriterionType CriterionType { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 医生Id
|
|
||||||
/// </summary>
|
|
||||||
public Guid DoctorId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 备注
|
|
||||||
/// </summary>
|
|
||||||
public string Remark { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
public Guid DoctorId { get; set; }
|
||||||
/// 文件类型
|
|
||||||
/// </summary>
|
[StringLength(400)]
|
||||||
public CriterionFileType FileType { get; set; }
|
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; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 是否启用
|
|
||||||
/// </summary>
|
|
||||||
public bool IsEnable { get; set; } = true;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public string CriterionName { get; set; } = string.Empty;
|
|
||||||
public Guid? TrialReadingCriterionId { get; set; }
|
|
||||||
public Guid? TrialId { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -29,23 +29,23 @@ public class DataInspection : BaseAddAuditEntity
|
||||||
public Guid? ChildrenTypeId { get; set; }
|
public Guid? ChildrenTypeId { get; set; }
|
||||||
|
|
||||||
[Comment(" 创建人姓名")]
|
[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(" 阅片医生")]
|
[Comment(" 阅片医生")]
|
||||||
public Guid? DoctorUserId { get; set; }
|
public Guid? DoctorUserId { get; set; }
|
||||||
|
|
||||||
[Comment(" 被稽查实体名")]
|
[Comment(" 被稽查实体名")]
|
||||||
public string EntityName { get; set; } = null!;
|
public string EntityName { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Comment(" 要稽查对象Id")]
|
[Comment(" 要稽查对象Id")]
|
||||||
public Guid? GeneralId { get; set; }
|
public Guid? GeneralId { get; set; }
|
||||||
|
|
||||||
[Comment(" 标识")]
|
[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(" 是否是前端添加")]
|
[Comment(" 是否是前端添加")]
|
||||||
public bool? IsFrontAdd { get; set; }
|
public bool? IsFrontAdd { get; set; }
|
||||||
|
@ -75,10 +75,10 @@ public class DataInspection : BaseAddAuditEntity
|
||||||
[Comment(" 父ID")]
|
[Comment(" 父ID")]
|
||||||
public Guid? ParentId { get; set; }
|
public Guid? ParentId { get; set; }
|
||||||
|
|
||||||
public string Reason { get; set; } = null!;
|
public string Reason { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Comment(" 角色名称")]
|
[Comment(" 角色名称")]
|
||||||
public string RoleName { get; set; } = null!;
|
public string RoleName { get; set; } = string.Empty;
|
||||||
|
|
||||||
public Guid? SignId { get; set; }
|
public Guid? SignId { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,8 @@ public class AuditEntityInterceptor(IUserInfo _userInfo, ILogger<AuditEntityInte
|
||||||
|
|
||||||
// 获取所有更改,删除,新增的实体,但排除审计实体(避免死循环)
|
// 获取所有更改,删除,新增的实体,但排除审计实体(避免死循环)
|
||||||
foreach (var entry in context.ChangeTracker.Entries().Where(u => (u.State == EntityState.Modified || u.State == EntityState.Added))
|
foreach (var entry in context.ChangeTracker.Entries().Where(u => (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
|
// 检查属性是否为string类型,并且值为null
|
||||||
foreach (var property in entry.Properties.Where(t=>t.Metadata.ClrType==typeof(string) && t.CurrentValue == null))
|
foreach (var property in entry.Properties.Where(t=>t.Metadata.ClrType==typeof(string) && t.CurrentValue == null))
|
||||||
|
|
Loading…
Reference in New Issue