Browse Source

职业病表

bjmzak
wxd 2 years ago
parent
commit
bfe650ebb2
  1. 24
      src/Shentun.Peis.Domain/OcCheckTypes/OcCheckType.cs
  2. 21
      src/Shentun.Peis.Domain/PoisonTypes/PoisonType.cs
  3. 24
      src/Shentun.Peis.Domain/Poisons/Poison.cs
  4. 39
      src/Shentun.Peis.Domain/ProtectiveMeasuress/ProtectiveMeasures.cs
  5. 24
      src/Shentun.Peis.Domain/Symptoms/Symptom.cs
  6. 36
      src/Shentun.Peis.EntityFrameworkCore/DbMapping/ProtectiveMeasuress/ProtectiveMeasuresDbMapping.cs
  7. 4
      src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs
  8. 14520
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240520155735_init20240520004.Designer.cs
  9. 38
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240520155735_init20240520004.cs
  10. 14520
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240520155942_init20240520005.Designer.cs
  11. 41
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240520155942_init20240520005.cs
  12. 46
      src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

24
src/Shentun.Peis.Domain/OcCheckTypes/OcCheckType.cs

@ -12,7 +12,7 @@ namespace Shentun.Peis.Models
/// 职业病检查类别设置
/// </summary>
[Table("oc_check_type")]
public class OcCheckType: AuditedEntity<Guid>, IHasConcurrencyStamp
public class OcCheckType: AuditedEntity<Guid>, IHasConcurrencyStamp
{
/// <summary>
@ -33,26 +33,6 @@ namespace Shentun.Peis.Models
[Column("concurrency_stamp")]
public string ConcurrencyStamp { get; set; }
//public override object[] GetKeys()
//{
// return new object[] { OcCheckTypeId };
//}
///// <summary>
///// 最后修改者
///// </summary>
//[Column("last_modifier_id")]
//public Guid LastModifierId { get; set; }
///// <summary>
///// 最后修改日期
///// </summary>
//[Column("last_modification_time", TypeName = "timestamp without time zone")]
//public DateTime LastModificationTime { get; set; }
//[Column("creator_id")]
//public Guid CreatorId { get; set; }
//[Column("creation_time", TypeName = "timestamp without time zone")]
//public DateTime CreationTime { get; set; }
//[Column("concurrency_stamp")]
//[StringLength(40)]
//public string ConcurrencyStamp { get; set; } = null!;
}
}

21
src/Shentun.Peis.Domain/PoisonTypes/PoisonType.cs

@ -38,30 +38,9 @@ namespace Shentun.Peis.Models
[Column("concurrency_stamp")]
public string ConcurrencyStamp { get; set; }
///// <summary>
///// 最后修改者
///// </summary>
//[Column("last_modifier_id")]
//public Guid LastModifierId { get; set; }
///// <summary>
///// 最后修改日期
///// </summary>
//[Column("last_modification_time", TypeName = "timestamp without time zone")]
//public DateTime LastModificationTime { get; set; }
//[Column("creator_id")]
//public Guid CreatorId { get; set; }
//[Column("creation_time", TypeName = "timestamp without time zone")]
//public DateTime CreationTime { get; set; }
//[Column("concurrency_stamp")]
//[StringLength(40)]
//public string ConcurrencyStamp { get; set; } = null!;
[InverseProperty(nameof(Poison.PoisonType))]
public virtual ICollection<Poison> Poisons { get; set; }
//public override object[] GetKeys()
//{
// return new object[] { PoisonTypeId };
//}
}
}

24
src/Shentun.Peis.Domain/Poisons/Poison.cs

@ -37,23 +37,7 @@ namespace Shentun.Peis.Models
/// </summary>
[Column("display_order")]
public int DisplayOrder { get; set; }
///// <summary>
///// 最后修改者
///// </summary>
//[Column("last_modifier_id")]
//public Guid LastModifierId { get; set; }
///// <summary>
///// 最后修改日期
///// </summary>
//[Column("last_modification_time", TypeName = "timestamp without time zone")]
//public DateTime LastModificationTime { get; set; }
//[Column("creator_id")]
//public Guid CreatorId { get; set; }
//[Column("creation_time", TypeName = "timestamp without time zone")]
//public DateTime CreationTime { get; set; }
//[Column("concurrency_stamp")]
//[StringLength(40)]
//public string ConcurrencyStamp { get; set; } = null!;
[Column("concurrency_stamp")]
public string ConcurrencyStamp { get; set; }
@ -64,10 +48,6 @@ namespace Shentun.Peis.Models
public virtual PoisonType PoisonType { get; set; } = null!;
[InverseProperty(nameof(PatientPoison.Poison))]
public virtual ICollection<PatientPoison> PatientPoisons { get; set; }
//public override object[] GetKeys()
//{
// return new object[] { PoisonId };
//}
}
}

39
src/Shentun.Peis.Domain/ProtectiveMeasuress/ProtectiveMeasures.cs

@ -0,0 +1,39 @@
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;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace Shentun.Peis.ProtectiveMeasuress
{
/// <summary>
/// 防护措施
/// </summary>
[Table("protective_measures")]
public class ProtectiveMeasures : AuditedEntity<Guid>, IHasConcurrencyStamp
{
/// <summary>
/// 防护措施名称
/// </summary>
[Column("display_name")]
[StringLength(50)]
public string DisplayName { get; set; }
[Column("simple_code")]
[StringLength(50)]
public string SimpleCode { get; set; } = null!;
/// <summary>
/// 显示顺序
/// </summary>
[Column("display_order")]
public int DisplayOrder { get; set; }
[Column("concurrency_stamp")]
public string ConcurrencyStamp { get; set; }
}
}

24
src/Shentun.Peis.Domain/Symptoms/Symptom.cs

@ -40,30 +40,10 @@ namespace Shentun.Peis.Models
public string ConcurrencyStamp { get; set; }
///// <summary>
///// 最后修改者
///// </summary>
//[Column("last_modifier_id")]
//public Guid LastModifierId { get; set; }
///// <summary>
///// 最后修改日期
///// </summary>
//[Column("last_modification_time", TypeName = "timestamp without time zone")]
//public DateTime LastModificationTime { get; set; }
//[Column("creator_id")]
//public Guid CreatorId { get; set; }
//[Column("creation_time", TypeName = "timestamp without time zone")]
//public DateTime CreationTime { get; set; }
//[Column("concurrency_stamp")]
//[StringLength(40)]
//public string ConcurrencyStamp { get; set; } = null!;
[InverseProperty(nameof(PatientSymptom.Symptom))]
public virtual ICollection<PatientSymptom> PatientSymptoms { get; set; }
//public override object[] GetKeys()
//{
// return new object[] { SymptomId };
//}
}
}

36
src/Shentun.Peis.EntityFrameworkCore/DbMapping/ProtectiveMeasuress/ProtectiveMeasuresDbMapping.cs

@ -0,0 +1,36 @@
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore;
using Shentun.Peis.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Shentun.Peis.ProtectiveMeasuress;
using Shentun.Peis.EntityFrameworkCore;
namespace Shentun.Peis.DbMapping
{
internal class ProtectiveMeasuresDbMapping : IEntityTypeConfiguration<ProtectiveMeasures>
{
public void Configure(EntityTypeBuilder<ProtectiveMeasures> entity)
{
entity.HasComment("防护措施");
entity.Property(e => e.Id)
.IsFixedLength()
.HasComment("编号").IsRequired();
entity.Property(e => e.DisplayOrder).HasComment("显示顺序").IsRequired().HasDefaultValueSql("999999");
entity.Property(e => e.DisplayName).HasComment("体检类别名称").IsRequired();
entity.Property(e => e.SimpleCode).HasComment("自定义简码").IsRequired();
entity.ConfigureByConvention();
}
}
}

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

@ -12,6 +12,7 @@ using Shentun.Peis.DbMapping.ChargeRequests;
using Shentun.Peis.DbMapping.PatientRegisterExters;
using Shentun.Peis.DbMapping.ThirdInterfaces;
using Shentun.Peis.Models;
using Shentun.Peis.ProtectiveMeasuress;
using Shentun.Peis.RoleMenuInfos;
using Shentun.Utilities;
using System;
@ -340,6 +341,9 @@ public class PeisDbContext :
public DbSet<DiseaseScreeningType> DiseaseScreeningTypes { get; set; } = null!;
public DbSet<ChargeBackAsbitem> ChargeBackAsbitems { get; set; } = null!;
public DbSet<ProtectiveMeasures> ProtectiveMeasuress { get; set; } = null!;
public PeisDbContext(DbContextOptions<PeisDbContext> options)
: base(options)
{

14520
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240520155735_init20240520004.Designer.cs
File diff suppressed because it is too large
View File

38
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240520155735_init20240520004.cs

@ -0,0 +1,38 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Shentun.Peis.Migrations
{
public partial class init20240520004 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "ProtectiveMeasuress",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
display_name = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
simple_code = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
display_order = table.Column<int>(type: "integer", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
LastModifierId = table.Column<Guid>(type: "uuid", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ProtectiveMeasuress", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ProtectiveMeasuress");
}
}
}

14520
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240520155942_init20240520005.Designer.cs
File diff suppressed because it is too large
View File

41
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240520155942_init20240520005.cs

@ -0,0 +1,41 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Shentun.Peis.Migrations
{
public partial class init20240520005 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_ProtectiveMeasuress",
table: "ProtectiveMeasuress");
migrationBuilder.RenameTable(
name: "ProtectiveMeasuress",
newName: "protective_measures");
migrationBuilder.AddPrimaryKey(
name: "PK_protective_measures",
table: "protective_measures",
column: "Id");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_protective_measures",
table: "protective_measures");
migrationBuilder.RenameTable(
name: "protective_measures",
newName: "ProtectiveMeasuress");
migrationBuilder.AddPrimaryKey(
name: "PK_ProtectiveMeasuress",
table: "ProtectiveMeasuress",
column: "Id");
}
}
}

46
src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

@ -11029,6 +11029,52 @@ namespace Shentun.Peis.Migrations
b.HasComment("用户控件权限-废弃");
});
modelBuilder.Entity("Shentun.Peis.ProtectiveMeasuress.ProtectiveMeasures", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uuid")
.HasColumnName("CreatorId");
b.Property<string>("DisplayName")
.HasMaxLength(50)
.HasColumnType("character varying(50)")
.HasColumnName("display_name");
b.Property<int>("DisplayOrder")
.HasColumnType("integer")
.HasColumnName("display_order");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp without time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("LastModifierId");
b.Property<string>("SimpleCode")
.HasMaxLength(50)
.HasColumnType("character varying(50)")
.HasColumnName("simple_code");
b.HasKey("Id");
b.ToTable("protective_measures");
});
modelBuilder.Entity("Shentun.Peis.RoleMenuInfos.RoleMenuInfo", b =>
{
b.Property<Guid>("RoleId")

Loading…
Cancel
Save