修改影响归档 seqId 自动生成,不是数据库自动生成
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
bd4e4e0072
commit
84f4343791
|
@ -16,6 +16,12 @@ namespace IRaCIS.Core.Domain.Models
|
|||
|
||||
}
|
||||
|
||||
//针对dicom
|
||||
public interface IEntitySeqId
|
||||
{
|
||||
public Guid SeqId { get; set; }
|
||||
}
|
||||
|
||||
public abstract class Entity : IEntity<Guid>
|
||||
{
|
||||
[Key]
|
||||
|
|
|
@ -5,7 +5,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
|||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
[Table("DicomInstance")]
|
||||
public class DicomInstance : BaseFullAuditEntity
|
||||
public class DicomInstance : BaseFullAuditEntity, IEntitySeqId
|
||||
{
|
||||
#region 导航属性
|
||||
[JsonIgnore]
|
||||
|
@ -18,7 +18,6 @@ namespace IRaCIS.Core.Domain.Models
|
|||
#endregion
|
||||
|
||||
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
|
||||
public Guid SeqId { get; set; }
|
||||
public Guid StudyId { get; set; }
|
||||
|
|
|
@ -6,7 +6,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
|||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
[Table("DicomSeries")]
|
||||
public class DicomSeries : BaseFullDeleteAuditEntity
|
||||
public class DicomSeries : BaseFullDeleteAuditEntity, IEntitySeqId
|
||||
{
|
||||
#region 导航属性
|
||||
[JsonIgnore]
|
||||
|
@ -22,7 +22,6 @@ namespace IRaCIS.Core.Domain.Models
|
|||
|
||||
|
||||
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public Guid SeqId { get; set; }
|
||||
public Guid StudyId { get; set; }
|
||||
public string StudyInstanceUid { get; set; }
|
||||
|
|
|
@ -6,7 +6,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
|||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
[Table("DicomStudy")]
|
||||
public class DicomStudy : BaseFullDeleteAuditEntity
|
||||
public class DicomStudy : BaseFullDeleteAuditEntity, IEntitySeqId
|
||||
{
|
||||
#region 导航属性
|
||||
//一个检查 由多个人管理
|
||||
|
@ -41,7 +41,6 @@ namespace IRaCIS.Core.Domain.Models
|
|||
|
||||
#endregion
|
||||
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public Guid SeqId { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
|
|
|
@ -5,7 +5,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
|||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
[Table("SCPInstance")]
|
||||
public class SCPInstance : BaseFullAuditEntity
|
||||
public class SCPInstance : BaseFullAuditEntity, IEntitySeqId
|
||||
{
|
||||
#region 导航属性
|
||||
[JsonIgnore]
|
||||
|
@ -18,7 +18,6 @@ namespace IRaCIS.Core.Domain.Models
|
|||
#endregion
|
||||
|
||||
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
|
||||
public Guid SeqId { get; set; }
|
||||
public Guid StudyId { get; set; }
|
||||
|
|
|
@ -6,7 +6,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
|||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
[Table("SCPSeries")]
|
||||
public class SCPSeries : BaseFullDeleteAuditEntity
|
||||
public class SCPSeries : BaseFullDeleteAuditEntity, IEntitySeqId
|
||||
{
|
||||
#region 导航属性
|
||||
[JsonIgnore]
|
||||
|
@ -18,7 +18,6 @@ namespace IRaCIS.Core.Domain.Models
|
|||
#endregion
|
||||
|
||||
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public Guid SeqId { get; set; }
|
||||
public Guid StudyId { get; set; }
|
||||
public string StudyInstanceUid { get; set; }
|
||||
|
|
|
@ -6,7 +6,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
|||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
[Table("SCPStudy")]
|
||||
public class SCPStudy : BaseFullDeleteAuditEntity
|
||||
public class SCPStudy : BaseFullDeleteAuditEntity, IEntitySeqId
|
||||
{
|
||||
|
||||
#region 导航属性
|
||||
|
@ -31,9 +31,6 @@ namespace IRaCIS.Core.Domain.Models
|
|||
//0 未知 1 单重 2 双重
|
||||
public bool IsDoubleReview { get; set; }
|
||||
|
||||
|
||||
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public Guid SeqId { get; set; }
|
||||
|
||||
[ForeignKey("PatientId")]
|
||||
|
|
|
@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
|||
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
public class TaskInstance : BaseFullAuditEntity
|
||||
public class TaskInstance : BaseFullAuditEntity, IEntitySeqId
|
||||
{
|
||||
#region 导航属性
|
||||
[JsonIgnore]
|
||||
|
@ -17,7 +17,6 @@ namespace IRaCIS.Core.Domain.Models
|
|||
#endregion
|
||||
|
||||
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
|
||||
public Guid SeqId { get; set; }
|
||||
public Guid StudyId { get; set; }
|
||||
|
|
|
@ -5,7 +5,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
|||
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
public class TaskSeries : BaseFullDeleteAuditEntity
|
||||
public class TaskSeries : BaseFullDeleteAuditEntity, IEntitySeqId
|
||||
{
|
||||
#region 导航属性
|
||||
[JsonIgnore]
|
||||
|
@ -18,7 +18,6 @@ namespace IRaCIS.Core.Domain.Models
|
|||
|
||||
|
||||
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public Guid SeqId { get; set; }
|
||||
public Guid StudyId { get; set; }
|
||||
public string StudyInstanceUid { get; set; }
|
||||
|
|
|
@ -5,7 +5,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
|||
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
public class TaskStudy : BaseFullDeleteAuditEntity
|
||||
public class TaskStudy : BaseFullDeleteAuditEntity, IEntitySeqId
|
||||
{
|
||||
#region 导航属性
|
||||
[JsonIgnore]
|
||||
|
@ -33,8 +33,6 @@ namespace IRaCIS.Core.Domain.Models
|
|||
|
||||
#endregion
|
||||
|
||||
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public Guid SeqId { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
|
|
|
@ -94,6 +94,10 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||
{
|
||||
modelBuilder.Entity(entityType.ClrType).Property<Guid>(nameof(Entity.Id)).HasValueGenerator<MySequentialGuidValueGenerator>();
|
||||
}
|
||||
if (typeof(IEntitySeqId).IsAssignableFrom(entityType.ClrType))
|
||||
{
|
||||
modelBuilder.Entity(entityType.ClrType).Property<Guid>(nameof(IEntitySeqId.SeqId)).HasValueGenerator<MySequentialGuidValueGenerator>();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue