Browse Source

register_cehck弃检模板 弃检模板表

master
wxd 3 days ago
parent
commit
eb6d86d227
  1. 56
      src/Shentun.Peis.Domain/GiveUpCheckTemplates/GiveUpCheckTemplate.cs
  2. 8
      src/Shentun.Peis.Domain/RegisterChecks/RegisterCheck.cs
  3. 25
      src/Shentun.Peis.EntityFrameworkCore/DbMapping/GiveUpCheckTemplates/GiveUpCheckTemplateDbMapping.cs
  4. 5
      src/Shentun.Peis.EntityFrameworkCore/DbMapping/RegisterChecks/RegisterCheckDbMapping.cs
  5. 5
      src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs

56
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
{
/// <summary>
/// 弃检模板
/// </summary>
[Table("give_up_check_template")]
public class GiveUpCheckTemplate : AuditedEntity<Guid>, IHasConcurrencyStamp
{
public GiveUpCheckTemplate() { }
public GiveUpCheckTemplate(Guid id) : base(id)
{
}
/// <summary>
/// 模板名称
/// </summary>
[Column("display_name")]
[StringLength(100)]
public string DisplayName { get; set; }
/// <summary>
/// 模板路径
/// </summary>
[Column("informed_consent_template_file")]
[StringLength(200)]
public string InformedConsentTemplateFile { get; set; }
/// <summary>
/// 是否启用 只能启用一个
/// </summary>
[Column("is_active")]
[MaxLength(1)]
public char IsActive { get; set; }
[Column("concurrency_stamp")]
public string ConcurrencyStamp { get; set; }
}
}

8
src/Shentun.Peis.Domain/RegisterChecks/RegisterCheck.cs

@ -358,6 +358,14 @@ namespace Shentun.Peis.Models
[StringLength(200)]
public string InformedConsentSignFile { get; set; }
/// <summary>
/// 弃检模板文件路径
/// </summary>
[Column("give_up_check_file")]
[StringLength(200)]
public string GiveUpCheckFile { get; set; }
/// <summary>
///弃检签名文件路径
/// </summary>

25
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<GiveUpCheckTemplate>
{
public void Configure(EntityTypeBuilder<GiveUpCheckTemplate> 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();
}
}
}

5
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)");

5
src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs

@ -407,6 +407,8 @@ public class PeisDbContext :
public DbSet<InformedConsentTemplate> InformedConsentTemplates { get; set; } = null!;
public DbSet<GiveUpCheckTemplate> GiveUpCheckTemplates { get; set; } = null!;
public PeisDbContext(DbContextOptions<PeisDbContext> 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

Loading…
Cancel
Save