5 changed files with 96 additions and 3 deletions
-
56src/Shentun.Peis.Domain/GiveUpCheckTemplates/GiveUpCheckTemplate.cs
-
8src/Shentun.Peis.Domain/RegisterChecks/RegisterCheck.cs
-
25src/Shentun.Peis.EntityFrameworkCore/DbMapping/GiveUpCheckTemplates/GiveUpCheckTemplateDbMapping.cs
-
5src/Shentun.Peis.EntityFrameworkCore/DbMapping/RegisterChecks/RegisterCheckDbMapping.cs
-
5src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.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; } |
|||
|
|||
|
|||
|
|||
} |
|||
} |
|||
@ -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(); |
|||
} |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue