diff --git a/src/Shentun.Peis.Domain/GiveUpCheckTemplates/GiveUpCheckTemplate.cs b/src/Shentun.Peis.Domain/GiveUpCheckTemplates/GiveUpCheckTemplate.cs new file mode 100644 index 00000000..cc99c3cb --- /dev/null +++ b/src/Shentun.Peis.Domain/GiveUpCheckTemplates/GiveUpCheckTemplate.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Domain.Entities.Auditing; + +namespace Shentun.Peis.Models +{ + + /// + /// 弃检模板 + /// + [Table("give_up_check_template")] + public class GiveUpCheckTemplate : AuditedEntity, IHasConcurrencyStamp + { + public GiveUpCheckTemplate() { } + + public GiveUpCheckTemplate(Guid id) : base(id) + { + } + + /// + /// 模板名称 + /// + [Column("display_name")] + [StringLength(100)] + public string DisplayName { get; set; } + + + /// + /// 模板路径 + /// + [Column("informed_consent_template_file")] + [StringLength(200)] + public string InformedConsentTemplateFile { get; set; } + + + /// + /// 是否启用 只能启用一个 + /// + [Column("is_active")] + [MaxLength(1)] + public char IsActive { get; set; } + + + [Column("concurrency_stamp")] + public string ConcurrencyStamp { get; set; } + + + + } +} diff --git a/src/Shentun.Peis.Domain/RegisterChecks/RegisterCheck.cs b/src/Shentun.Peis.Domain/RegisterChecks/RegisterCheck.cs index f620b721..9ab56eaf 100644 --- a/src/Shentun.Peis.Domain/RegisterChecks/RegisterCheck.cs +++ b/src/Shentun.Peis.Domain/RegisterChecks/RegisterCheck.cs @@ -358,6 +358,14 @@ namespace Shentun.Peis.Models [StringLength(200)] public string InformedConsentSignFile { get; set; } + + /// + /// 弃检模板文件路径 + /// + [Column("give_up_check_file")] + [StringLength(200)] + public string GiveUpCheckFile { get; set; } + /// ///弃检签名文件路径 /// diff --git a/src/Shentun.Peis.EntityFrameworkCore/DbMapping/GiveUpCheckTemplates/GiveUpCheckTemplateDbMapping.cs b/src/Shentun.Peis.EntityFrameworkCore/DbMapping/GiveUpCheckTemplates/GiveUpCheckTemplateDbMapping.cs new file mode 100644 index 00000000..f3b2123f --- /dev/null +++ b/src/Shentun.Peis.EntityFrameworkCore/DbMapping/GiveUpCheckTemplates/GiveUpCheckTemplateDbMapping.cs @@ -0,0 +1,25 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Builders; +using Shentun.Peis.EntityFrameworkCore; +using Shentun.Peis.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Shentun.Peis.DbMapping +{ + internal class GiveUpCheckTemplateDbMapping : IEntityTypeConfiguration + { + public void Configure(EntityTypeBuilder entity) + { + entity.HasComment("弃检模板"); + entity.Property(t => t.DisplayName).HasComment("模板名称").IsRequired(); + entity.Property(t => t.InformedConsentTemplateFile).HasComment("模板路径").IsRequired(); + entity.Property(t => t.IsActive).HasComment("是否启用 只能启用一个").IsRequired().HasDefaultValueSql("'N'"); ; + + entity.ConfigureByConvention(); + } + } +} diff --git a/src/Shentun.Peis.EntityFrameworkCore/DbMapping/RegisterChecks/RegisterCheckDbMapping.cs b/src/Shentun.Peis.EntityFrameworkCore/DbMapping/RegisterChecks/RegisterCheckDbMapping.cs index bfdce5ba..37092327 100644 --- a/src/Shentun.Peis.EntityFrameworkCore/DbMapping/RegisterChecks/RegisterCheckDbMapping.cs +++ b/src/Shentun.Peis.EntityFrameworkCore/DbMapping/RegisterChecks/RegisterCheckDbMapping.cs @@ -44,11 +44,12 @@ namespace Shentun.Peis.DbMapping entity.Property(t => t.ExecFlag).HasComment("执行标志 跟第三方对接标记状态").IsRequired().HasDefaultValueSql("'0'"); entity.Property(t => t.InformedConsentFile).HasComment("知情同意书文件路径"); entity.Property(t => t.InformedConsentSignFile).HasComment("存储知情同意书签名文件路径"); + entity.Property(t => t.GiveUpCheckFile).HasComment("弃检模板文件路径"); entity.Property(t => t.GiveUpCheckSignFile).HasComment("弃检签名文件路径"); entity.Property(e => e.Id).ValueGeneratedNever(); //entity.Property(t => t.MedicalCenterId).HasComment("体检中心id").IsRequired().HasDefaultValue(Guid.Empty); - - + + //entity.Property(e => e.LastModificationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); diff --git a/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs b/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs index cb2e5342..1518e0d8 100644 --- a/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs +++ b/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs @@ -407,6 +407,8 @@ public class PeisDbContext : public DbSet InformedConsentTemplates { get; set; } = null!; + public DbSet GiveUpCheckTemplates { get; set; } = null!; + public PeisDbContext(DbContextOptions options) : base(options) { @@ -669,7 +671,8 @@ public class PeisDbContext : .ApplyConfiguration(new RoleDirectorMenuInfoDbMapping()) .ApplyConfiguration(new InterfaceSendLogDbMapping()) .ApplyConfiguration(new PreCheckAsbitemDbMapping()) - .ApplyConfiguration(new InformedConsentTemplateDbMapping()); + .ApplyConfiguration(new InformedConsentTemplateDbMapping()) + .ApplyConfiguration(new GiveUpCheckTemplateDbMapping()); #endregion