9 changed files with 113 additions and 9 deletions
-
16src/Shentun.WebPeis.Application/QuestionRegisters/QuestionRegisterAppService.cs
-
3src/Shentun.WebPeis.Domain/Models/DiseaseRiskLevel.cs
-
5src/Shentun.WebPeis.Domain/Models/Question.cs
-
5src/Shentun.WebPeis.Domain/Models/QuestionAnswer.cs
-
36src/Shentun.WebPeis.Domain/Models/QuestionNature.cs
-
3src/Shentun.WebPeis.EntityFrameworkCore/Configures/DiseaseRiskLevelConfigure.cs
-
4src/Shentun.WebPeis.EntityFrameworkCore/Configures/QuestionConfigure.cs
-
49src/Shentun.WebPeis.EntityFrameworkCore/Configures/QuestionNatureConfigure.cs
-
1src/Shentun.WebPeis.EntityFrameworkCore/EntityFrameworkCore/WebPeisDbContext.cs
@ -0,0 +1,36 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Domain.Entities.Auditing; |
|||
using Volo.Abp.Domain.Entities; |
|||
|
|||
namespace Shentun.WebPeis.Models |
|||
{ |
|||
public class QuestionNature : AuditedEntity, IHasConcurrencyStamp |
|||
{ |
|||
/// <summary>
|
|||
/// 主键
|
|||
/// </summary>
|
|||
public string QuestionNatureId { get; set; } |
|||
/// <summary>
|
|||
/// 名称
|
|||
/// </summary>
|
|||
|
|||
public string QuestionNatureName { get; set; } = null!; |
|||
|
|||
public string SimpleCode { get; set; } = null!; |
|||
|
|||
public int DisplayOrder { get; set; } |
|||
|
|||
|
|||
|
|||
public string? ConcurrencyStamp { get; set; } |
|||
|
|||
public override object?[] GetKeys() |
|||
{ |
|||
return [QuestionNatureId]; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,49 @@ |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Metadata.Builders; |
|||
using Shentun.WebPeis.Models; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Domain.Entities; |
|||
|
|||
namespace Shentun.WebPeis.Configures |
|||
{ |
|||
public class QuestionNatureConfigure : IEntityTypeConfiguration<QuestionNature> |
|||
{ |
|||
public void Configure(EntityTypeBuilder<QuestionNature> entity) |
|||
{ |
|||
entity.HasKey(e => e.QuestionNatureId).HasName("pk_question_nature"); |
|||
|
|||
entity.ToTable("question_nature"); |
|||
|
|||
entity.HasIndex(e => e.QuestionNatureName, "ix_question_nature").IsUnique(); |
|||
|
|||
entity.Property(e => e.QuestionNatureId) |
|||
.HasMaxLength(2) |
|||
.HasColumnName("question_nature_id"); |
|||
entity.Property(e => e.CreationTime) |
|||
.HasColumnType("timestamp(6) without time zone") |
|||
.HasColumnName("creation_time"); |
|||
entity.Property(e => e.CreatorId).HasColumnName("creator_id"); |
|||
entity.Property(e => e.QuestionNatureName) |
|||
.HasMaxLength(20) |
|||
.HasColumnName("disease_risk_name"); |
|||
entity.Property(e => e.DisplayOrder) |
|||
.HasDefaultValue(999999) |
|||
.HasColumnName("display_order"); |
|||
entity.Property(e => e.LastModificationTime) |
|||
.HasColumnType("timestamp(6) without time zone") |
|||
.HasColumnName("last_modification_time"); |
|||
entity.Property(e => e.LastModifierId).HasColumnName("last_modifier_id"); |
|||
entity.Property(e => e.SimpleCode) |
|||
.HasMaxLength(20) |
|||
.HasColumnName("simple_code"); |
|||
|
|||
entity.Property(e => e.ConcurrencyStamp) |
|||
.HasMaxLength(40) |
|||
.HasColumnName("concurrency_stamp"); |
|||
} |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue