From 7b0a47026e10e5b7be41f6e9466b5badc4bd628e Mon Sep 17 00:00:00 2001 From: wxd <270608793@qq.com> Date: Sat, 6 May 2023 11:56:52 +0800 Subject: [PATCH] =?UTF-8?q?IsActive=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Shentun.Peis.Domain/Models/Asbitem.cs | 4 +- src/Shentun.Peis.Domain/Models/Department.cs | 4 +- src/Shentun.Peis.Domain/Models/Item.cs | 4 +- .../Models/MedicalPackage.cs | 4 +- src/Shentun.Peis.Domain/Models/Room.cs | 4 +- src/Shentun.Peis.Domain/Models/User.cs | 4 +- .../EntityFrameworkCore/PeisDbContext.cs | 2 +- .../Migrations/20230506035600_i2.Designer.cs | 10543 ++++++++++++++++ .../Migrations/20230506035600_i2.cs | 75 + .../Migrations/PeisDbContextModelSnapshot.cs | 36 +- 10 files changed, 10649 insertions(+), 31 deletions(-) create mode 100644 src/Shentun.Peis.EntityFrameworkCore/Migrations/20230506035600_i2.Designer.cs create mode 100644 src/Shentun.Peis.EntityFrameworkCore/Migrations/20230506035600_i2.cs diff --git a/src/Shentun.Peis.Domain/Models/Asbitem.cs b/src/Shentun.Peis.Domain/Models/Asbitem.cs index fac225f..24babfa 100644 --- a/src/Shentun.Peis.Domain/Models/Asbitem.cs +++ b/src/Shentun.Peis.Domain/Models/Asbitem.cs @@ -127,9 +127,9 @@ namespace Shentun.Peis.Models /// /// 是启用 /// - [Column("is_valid")] + [Column("is_active")] [MaxLength(1)] - public char IsValid { get; set; } + public char IsActive { get; set; } [Column("simple_code")] [StringLength(30)] public string SimpleCode { get; set; } = null!; diff --git a/src/Shentun.Peis.Domain/Models/Department.cs b/src/Shentun.Peis.Domain/Models/Department.cs index 1100e80..de36f38 100644 --- a/src/Shentun.Peis.Domain/Models/Department.cs +++ b/src/Shentun.Peis.Domain/Models/Department.cs @@ -40,9 +40,9 @@ namespace Shentun.Peis.Models [Column("code_prefix")] [StringLength(2)] public string? CodePrefix { get; set; } - [Column("is_valid")] + [Column("is_active")] [MaxLength(1)] - public char IsValid { get; set; } + public char IsActive { get; set; } [Column("simple_code")] [StringLength(20)] public string SimpleCode { get; set; } = null!; diff --git a/src/Shentun.Peis.Domain/Models/Item.cs b/src/Shentun.Peis.Domain/Models/Item.cs index e584d4c..c37a764 100644 --- a/src/Shentun.Peis.Domain/Models/Item.cs +++ b/src/Shentun.Peis.Domain/Models/Item.cs @@ -78,9 +78,9 @@ namespace Shentun.Peis.Models [Column("input_check")] [StringLength(100)] public string? InputCheck { get; set; } - [Column("is_valid")] + [Column("is_active")] [MaxLength(1)] - public char IsValid { get; set; } + public char IsActive { get; set; } [Column("simple_code")] [StringLength(30)] public string SimpleCode { get; set; } = null!; diff --git a/src/Shentun.Peis.Domain/Models/MedicalPackage.cs b/src/Shentun.Peis.Domain/Models/MedicalPackage.cs index 2cdabc9..82c30d9 100644 --- a/src/Shentun.Peis.Domain/Models/MedicalPackage.cs +++ b/src/Shentun.Peis.Domain/Models/MedicalPackage.cs @@ -42,9 +42,9 @@ namespace Shentun.Peis.Models /// /// 启用标志 /// - [Column("is_valid")] + [Column("is_active")] [MaxLength(1)] - public char IsValid { get; set; } + public char IsActive { get; set; } /// /// 备注 /// diff --git a/src/Shentun.Peis.Domain/Models/Room.cs b/src/Shentun.Peis.Domain/Models/Room.cs index 11196a2..f77f3f0 100644 --- a/src/Shentun.Peis.Domain/Models/Room.cs +++ b/src/Shentun.Peis.Domain/Models/Room.cs @@ -35,9 +35,9 @@ namespace Shentun.Peis.Models [Column("room_type_flag")] [MaxLength(1)] public char RoomTypeFlag { get; set; } - [Column("is_valid")] + [Column("is_active")] [MaxLength(1)] - public char IsValid { get; set; } + public char IsActive { get; set; } [Column("simple_code")] [StringLength(20)] public string SimpleCode { get; set; } = null!; diff --git a/src/Shentun.Peis.Domain/Models/User.cs b/src/Shentun.Peis.Domain/Models/User.cs index b0b90d4..b0aa310 100644 --- a/src/Shentun.Peis.Domain/Models/User.cs +++ b/src/Shentun.Peis.Domain/Models/User.cs @@ -56,9 +56,9 @@ namespace Shentun.Peis.Models [Column("simple_code")] [StringLength(20)] public string SimpleCode { get; set; } = null!; - [Column("is_valid")] + [Column("is_active")] [MaxLength(1)] - public char IsValid { get; set; } + public char IsActive { get; set; } [Column("lock_screen_time_interval")] public int LockScreenTimeInterval { get; set; } [Column("photo")] diff --git a/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs b/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs index 1a228aa..4f44731 100644 --- a/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs +++ b/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs @@ -1898,7 +1898,7 @@ public class PeisDbContext : .HasDefaultValueSql("'A'::bpchar") .HasComment("适用性别"); - entity.Property(e => e.IsValid).HasComment("启用标志"); + entity.Property(e => e.IsActive).HasComment("启用标志"); //entity.Property(e => e.LastModificationTime).HasComment("最后修改日期"); diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230506035600_i2.Designer.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230506035600_i2.Designer.cs new file mode 100644 index 0000000..916d5c1 --- /dev/null +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230506035600_i2.Designer.cs @@ -0,0 +1,10543 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using Shentun.Peis.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Shentun.Peis.Migrations +{ + [DbContext(typeof(PeisDbContext))] + [Migration("20230506035600_i2")] + partial class i2 + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) + .HasAnnotation("ProductVersion", "6.0.5") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("AsbitemRoom", b => + { + b.Property("AsbitemId") + .HasColumnType("uuid"); + + b.Property("RoomId") + .HasColumnType("uuid"); + + b.HasKey("AsbitemId", "RoomId"); + + b.ToTable("AsbitemRoom"); + }); + + modelBuilder.Entity("ChildDiagnosis", b => + { + b.Property("ParentDiagnosisId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("parent_diagnosis_id") + .IsFixedLength(); + + b.Property("DiagnosisId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength(); + + b.HasKey("ParentDiagnosisId", "DiagnosisId") + .HasName("pk_child_diagnosis"); + + b.HasIndex("DiagnosisId"); + + b.ToTable("child_diagnosis", (string)null); + + b.HasComment("子诊断"); + }); + + modelBuilder.Entity("DiagnosisDiagnosis", b => + { + b.Property("DiagnosisId") + .HasColumnType("uuid"); + + b.Property("ParentDiagnosisId") + .HasColumnType("uuid"); + + b.HasKey("DiagnosisId", "ParentDiagnosisId"); + + b.ToTable("DiagnosisDiagnosis"); + }); + + modelBuilder.Entity("RoomAsbitem", b => + { + b.Property("RoomId") + .HasMaxLength(5) + .HasColumnType("uuid") + .HasColumnName("room_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasMaxLength(6) + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.HasKey("RoomId", "AsbitemId") + .HasName("pk_room_asbitem"); + + b.HasIndex("AsbitemId"); + + b.ToTable("room_asbitem", (string)null); + + b.HasComment("房间包含组合项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.Student", b => + { + b.Property("Sid") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("sid"); + + b.Property("Cid") + .HasColumnType("text"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("Uid") + .HasColumnType("uuid"); + + b.HasKey("Sid"); + + b.ToTable("student"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestA", b => + { + b.Property("AId") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("AName") + .HasColumnType("text"); + + b.HasKey("AId"); + + b.ToTable("testa"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestB", b => + { + b.Property("BId") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AId") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("AName") + .HasColumnType("text"); + + b.Property("TestAsAId") + .HasColumnType("uuid"); + + b.HasKey("BId"); + + b.HasIndex("TestAsAId"); + + b.ToTable("testb"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("ClinicalMeaning") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("clinical_meaning"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DefaultResult") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("default_result"); + + b.Property("DeviceTypeId") + .HasColumnType("uuid") + .HasColumnName("device_type_id") + .IsFixedLength(); + + b.Property("DiagnosisFunction") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("diagnosis_function"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar"); + + b.Property("InvoiceItemTypeId") + .HasColumnType("uuid") + .HasColumnName("invoice_item_type_id") + .IsFixedLength(); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("IsBeforeEat") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_before_eat"); + + b.Property("IsCheck") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_check"); + + b.Property("IsContinueProcess") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_continue_process"); + + b.Property("IsDiagnosisFunction") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_diagnosis_function"); + + b.Property("IsItemResultMerger") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_item_result_merger"); + + b.Property("IsPictureRotate") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_picture_rotate"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(8, 2) + .HasColumnType("numeric(8,2)") + .HasColumnName("price"); + + b.Property("QueueTime") + .HasPrecision(3, 1) + .HasColumnType("numeric(3,1)") + .HasColumnName("queue_time"); + + b.Property("ShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("short_name"); + + b.Property("SimpleCode") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("InvoiceItemTypeId"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_asbitem") + .IsUnique(); + + b.ToTable("asbitem"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemDetail", b => + { + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.HasKey("AsbitemId", "ItemId") + .HasName("pk_department_asbitem_detail"); + + b.HasIndex("ItemId"); + + b.ToTable("asbitem_detail"); + + b.HasComment("组合项目包含项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemGuide", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("ForSexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id"); + + b.Property("Guide") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("guide"); + + b.HasKey("OrganizationUnitId", "AsbitemId", "ForSexId") + .HasName("pk_department_asbitem_guide"); + + b.ToTable("asbitem_guide"); + + b.HasComment("体检中心组和项目指引内容"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemPriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PriceItemId") + .HasColumnType("uuid") + .HasColumnName("price_item_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.ToTable("asbitem_price_item"); + + b.HasComment("组和项目包含价表项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultConclusion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("BigtextResultTemplateId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_template_id") + .IsFixedLength(); + + b.Property("Conclusion") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("conclusion"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTemplateId"); + + b.ToTable("bigtext_result_conclusion"); + + b.HasComment("大文本结果结论"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultDescription", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("BigtextResultTemplateId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_template_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("description"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTemplateId"); + + b.ToTable("bigtext_result_description"); + + b.HasComment("大文本结果描述"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("BigtextResultTypeId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_type_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTypeId"); + + b.ToTable("bigtext_result_template"); + + b.HasComment("大文本结果模板"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("ItemTypeId"); + + b.ToTable("bigtext_result_type"); + + b.HasComment("大文本结果类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BirthPlace", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CountryCode") + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("country_code"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_birth_place") + .IsUnique(); + + b.ToTable("birth_place"); + + b.HasComment("出生地"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardBill", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("编号"); + + b.Property("BillFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("bill_flag") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("记账标志"); + + b.Property("BillMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("bill_money") + .HasComment("记账金额"); + + b.Property("CardRegisterId") + .HasColumnType("uuid") + .HasColumnName("card_register_id") + .HasComment("卡登记编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PayModeId") + .ValueGeneratedOnAdd() + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .HasDefaultValueSql("'1'::bpchar") + .IsFixedLength() + .HasComment("支付方式"); + + b.HasKey("Id"); + + b.HasIndex("CardRegisterId"); + + b.HasIndex("PayModeId"); + + b.ToTable("card_bill"); + + b.HasComment("卡记账记录"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardRegister", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("编号"); + + b.Property("CardFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("card_flag") + .HasDefaultValueSql("0") + .HasComment("使用标志"); + + b.Property("CardNo") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("card_no") + .HasComment("卡号"); + + b.Property("CardPassword") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("card_password"); + + b.Property("CardTypeId") + .HasColumnType("uuid") + .HasColumnName("card_type_id") + .IsFixedLength() + .HasComment("卡类型"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("customer_name") + .HasComment("领用者"); + + b.Property("Discount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("discount") + .HasDefaultValueSql("100") + .HasComment("折扣"); + + b.Property("ExpiryDate") + .HasColumnType("date") + .HasColumnName("expiry_date") + .HasComment("有效期"); + + b.Property("IdNo") + .HasMaxLength(18) + .HasColumnType("character varying(18)") + .HasColumnName("id_no") + .HasComment("身份证号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MobileTelephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("mobile_telephone") + .HasComment("手机"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength(); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("Telephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("telephone") + .HasComment("电话"); + + b.HasKey("Id"); + + b.HasIndex("CardTypeId"); + + b.HasIndex("OrganizationUnitId"); + + b.HasIndex(new[] { "CardNo", "CardFlag" }, "ix_card_register") + .IsUnique(); + + b.ToTable("card_register"); + + b.HasComment("会员卡登记"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CardModeId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("card_mode_id") + .HasDefaultValueSql("0") + .HasComment("卡模式"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Discount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("discount") + .HasDefaultValueSql("100") + .HasComment("折扣"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("ExpiryDay") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("expiry_day") + .HasDefaultValueSql("3650") + .HasComment("有效期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("Id"); + + b.ToTable("card_type"); + + b.HasComment("会员卡类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Charge", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("收据号"); + + b.Property("ChargeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("charge_flag") + .HasDefaultValueSql("0"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("InvoiceNo") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("invoice_no"); + + b.Property("InvoiceOrgName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("invoice_org_name"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("登记流水号"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PatientRegisterId" }, "fki_fk_patient_register_charge"); + + b.HasIndex(new[] { "PatientRegisterId" }, "ix_charge"); + + b.ToTable("charge"); + + b.HasComment("收费主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeAsbitem", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目"); + + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price") + .HasComment("价格"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RegisterAsbitemId") + .HasColumnType("uuid") + .HasColumnName("register_asbitem_id"); + + b.HasKey("Id"); + + b.HasIndex("AsbitemId"); + + b.HasIndex("ChargeId"); + + b.ToTable("charge_asbitem"); + + b.HasComment("收费包含组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBack", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("退费编号"); + + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id"); + + b.HasKey("Id"); + + b.HasIndex("ChargeId"); + + b.ToTable("charge_back"); + + b.HasComment("退费主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBackPay", b => + { + b.Property("ChargeBackId") + .HasColumnType("uuid") + .HasColumnName("charge_back_id"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength(); + + b.Property("BackMoeny") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("back_moeny"); + + b.HasKey("ChargeBackId", "PayModeId") + .HasName("pk_department_charge_back_pay"); + + b.HasIndex("PayModeId"); + + b.ToTable("charge_back_pay"); + + b.HasComment("退费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePay", b => + { + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("PayModeId") + .ValueGeneratedOnAdd() + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .HasDefaultValueSql("'1'::bpchar") + .IsFixedLength() + .HasComment("支付方式"); + + b.Property("CardBillId") + .HasColumnType("uuid") + .HasColumnName("card_bill_id"); + + b.Property("ChargeMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_money") + .HasComment("金额"); + + b.HasKey("ChargeId", "PayModeId") + .HasName("pk_department_charge_pay"); + + b.HasIndex("PayModeId"); + + b.ToTable("charge_pay"); + + b.HasComment("收费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("ChargeAsbitemId") + .HasColumnType("uuid") + .HasColumnName("charge_asbitem_id"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PriceItemId") + .HasColumnType("uuid") + .HasColumnName("price_item_id"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ChargeAsbitemId" }, "fki_fk_charge_asbitem"); + + b.HasIndex(new[] { "ChargeAsbitemId", "PriceItemId" }, "ix_charge_price_item"); + + b.ToTable("charge_price_item"); + + b.HasComment("收费价表项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonChar", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CommonCharTypeId") + .HasColumnType("uuid") + .HasColumnName("common_char_type_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(1) + .HasColumnType("character varying(1)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(1) + .HasColumnType("character varying(1)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("CommonCharTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_common_char") + .IsUnique(); + + b.ToTable("common_char"); + + b.HasComment("常用字符"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonCharType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_common_char_type") + .IsUnique(); + + b.ToTable("common_char_type"); + + b.HasComment("常用字符类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactMethod", b => + { + b.Property("ContactPersonId") + .HasColumnType("uuid") + .HasColumnName("contact_person_id") + .IsFixedLength(); + + b.Property("ContactMethodValue") + .HasMaxLength(15) + .HasColumnType("character varying(15)") + .HasColumnName("contact_method_value"); + + b.Property("ContactMethodType") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("contact_method_type") + .HasDefaultValueSql("'M'::bpchar"); + + b.HasKey("ContactPersonId", "ContactMethodValue") + .HasName("pk_department_contact_method"); + + b.ToTable("contact_method"); + + b.HasComment("联系方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("Title") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("title"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_contact"); + + b.HasIndex(new[] { "SimpleCode" }, "ix_contact_simple_code"); + + b.ToTable("contact_person"); + + b.HasComment("联系人"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValue", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalValueTypeId") + .HasColumnType("uuid") + .HasColumnName("critical_value_type_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("CriticalValueTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_critical_value") + .IsUnique(); + + b.ToTable("critical_value"); + + b.HasComment("危急值关键字设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValueType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_critical_value_type") + .IsUnique(); + + b.ToTable("critical_value_type"); + + b.HasComment("危急值类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrg", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("单位ID"); + + b.Property("Accounts") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("accounts") + .HasComment("银行帐号"); + + b.Property("Address") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("address") + .HasComment("联系地址"); + + b.Property("Bank") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("bank") + .HasComment("业务银行"); + + b.Property("ConcurrencyStamp") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("单位名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("Fax") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("fax") + .HasComment("传真"); + + b.Property("InvoiceName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("invoice_name"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OrgTypeId") + .HasColumnType("uuid") + .HasColumnName("org_type_id") + .IsFixedLength() + .HasComment("单位性质"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(60) + .HasColumnType("character varying(60)") + .HasColumnName("path_code"); + + b.Property("PostalCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("postal_code") + .HasComment("邮政编码"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("ShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("short_name"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.Property("StatusFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("status_flag") + .HasDefaultValueSql("0"); + + b.Property("Telephone") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("telephone") + .HasComment("联系电话"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "OrganizationUnitId" }, "fki_fk_customer_org_organization_units"); + + b.HasIndex(new[] { "ParentId", "DisplayName" }, "ix_org") + .IsUnique(); + + b.ToTable("customer_org"); + + b.HasComment("团检单位设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgCharge", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ChargeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("charge_flag"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Payer") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("payer"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_customer_org_charge_register"); + + b.ToTable("customer_org_charge"); + + b.HasComment("团检单位收费"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBack", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgChargeId") + .HasColumnType("uuid") + .HasColumnName("customer_org_charge_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgChargeId"); + + b.ToTable("customer_org_charge_back"); + + b.HasComment("团检单位退费"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBackPay", b => + { + b.Property("CustomerOrgChargeBackId") + .HasColumnType("uuid") + .HasColumnName("customer_org_charge_back_id"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength(); + + b.Property("BackMoeny") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("back_moeny"); + + b.HasKey("CustomerOrgChargeBackId", "PayModeId") + .HasName("pk_org_charge_back_pay"); + + b.HasIndex("PayModeId"); + + b.ToTable("customer_org_charge_back_pay"); + + b.HasComment("团结退费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargePay", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ChargeMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_money"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("PayModeId"); + + b.ToTable("customer_org_charge_pay"); + + b.HasComment("团检收费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroup", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("分组编号"); + + b.Property("AgeLowerLimit") + .HasColumnType("smallint") + .HasColumnName("age_lower_limit") + .HasComment("适用年龄下限"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("120") + .HasComment("适用年龄上限"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("分组名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别"); + + b.Property("JobPost") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_post") + .HasComment("适用职务"); + + b.Property("JobTitle") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_title") + .HasComment("适用职称"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MaritalStatusId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasComment("适用婚姻状况"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_customer_org_group_register"); + + b.ToTable("customer_org_group"); + + b.HasComment("团体分组主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroupDetail", b => + { + b.Property("CustomerOrgGroupId") + .HasColumnType("uuid") + .HasColumnName("customer_org_group_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price"); + + b.HasKey("CustomerOrgGroupId", "AsbitemId") + .HasName("pk_org_group_detail"); + + b.HasIndex("AsbitemId"); + + b.ToTable("customer_org_group_detail"); + + b.HasComment("团检分组包含组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgRegister", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("BeginTime") + .ValueGeneratedOnAdd() + .HasColumnType("date") + .HasColumnName("begin_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("开始日期"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("单位编号"); + + b.Property("EndTime") + .HasColumnType("date") + .HasColumnName("end_time") + .HasComment("结束日期"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasComment("完成标志"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MedicalTimes") + .HasColumnType("smallint") + .HasColumnName("medical_times") + .HasComment("单位体检次数"); + + b.Property("RegisterName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("register_name"); + + b.Property("RegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("register_no"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgId"); + + b.ToTable("customer_org_register"); + + b.HasComment("团检体检登记"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_org_type") + .IsUnique(); + + b.ToTable("customer_org_type"); + + b.HasComment("团体类型设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Department", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CodePrefix") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("code_prefix"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("department_type_flag"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasMaxLength(4) + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName", "ParentId" }, "ix_department") + .IsUnique(); + + b.ToTable("department"); + + b.HasComment("部门"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DeviceType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("仪器类别编号"); + + b.Property("CheckTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("check_type_flag"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("仪器类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.ToTable("device_type"); + + b.HasComment("仪器类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Diagnosis", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisLevelId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_level_id"); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar"); + + b.Property("IsIll") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_ill"); + + b.Property("IsSummaryTemplate") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_summary_template"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("simple_code"); + + b.Property("SuggestionName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_name"); + + b.HasKey("Id"); + + b.HasIndex("DiagnosisLevelId"); + + b.HasIndex("ItemTypeId"); + + b.ToTable("diagnosis"); + + b.HasComment("诊断设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisLevel", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.ToTable("diagnosis_level"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisPostfix", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_diagnosis_postfix") + .IsUnique(); + + b.ToTable("diagnosis_postfix"); + + b.HasComment("诊断后缀设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_diagnosis_template") + .IsUnique(); + + b.ToTable("diagnosis_template"); + + b.HasComment("诊断模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplateDetail", b => + { + b.Property("DiagnosisTemplateId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_template_id") + .IsFixedLength(); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength(); + + b.HasKey("DiagnosisTemplateId", "DiagnosisId") + .HasName("pk_diagnosis_template_detail"); + + b.HasIndex("DiagnosisId"); + + b.ToTable("diagnosis_template_detail"); + + b.HasComment("诊断模板包含明细"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("path_code"); + + b.HasKey("Id"); + + b.ToTable("diagnosis_type"); + + b.HasComment("诊断类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpMode", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("follow_up_mode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpPlan", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CycleDays") + .HasColumnType("smallint") + .HasColumnName("cycle_days"); + + b.Property("DoctorUserId") + .HasColumnType("uuid") + .HasColumnName("doctor_user_id"); + + b.Property("FollowUpModeId") + .HasColumnType("uuid") + .HasColumnName("follow_up_mode_id") + .IsFixedLength(); + + b.Property("FollowUpTypeId") + .HasColumnType("uuid") + .HasColumnName("follow_up_type_id") + .IsFixedLength(); + + b.Property("IsLoop") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_loop"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PerfomFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("perfom_flag"); + + b.Property("PerfomTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("perfom_time"); + + b.Property("PerfomUserId") + .HasColumnType("uuid") + .HasColumnName("perfom_user_id"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark"); + + b.HasKey("Id"); + + b.ToTable("follow_up_plan"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("follow_up_type"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ForSex", b => + { + b.Property("ForSexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code"); + + b.HasKey("ForSexId"); + + b.ToTable("for_sex"); + + b.HasComment("可支持性别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Grouping", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ModifiedDate") + .HasColumnType("date") + .HasColumnName("modified_date"); + + b.Property("Modifier") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("modifier"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_grouping") + .IsUnique(); + + b.ToTable("grouping"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.GuideType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("guide_type"); + + b.HasComment("指引类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.HealthCertificate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("登记流水号"); + + b.Property("CertificateDate") + .HasColumnType("date") + .HasColumnName("certificate_date") + .HasComment("发证日期"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("certificate_no") + .HasComment("证件编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ServiceOrg") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("service_org") + .HasComment("服务单位"); + + b.Property("ServiceTradesId") + .HasColumnType("smallint") + .HasColumnName("service_trades_id") + .HasComment("服务行业"); + + b.HasKey("Id"); + + b.ToTable("health_certificate"); + + b.HasComment("健康证办理"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ImportLisResult", b => + { + b.Property("LisRequestNo") + .HasColumnType("uuid") + .HasColumnName("lis_request_no") + .HasComment("条码号"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .HasComment("项目"); + + b.Property("CheckDoctorName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CheckTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("check_time") + .HasComment("检查日期"); + + b.Property("CriticalRangeValue") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("critical_range_value"); + + b.Property("ImportTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("导入日期"); + + b.Property("ItemName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("item_name"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no") + .HasComment("条码号"); + + b.Property("ReferenceRangeValue") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("reference_range_value") + .HasComment("参考范围"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("ReportPrompt") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("report_prompt") + .HasComment("报告单提示"); + + b.Property("Result") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("Unit") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("unit") + .HasComment("单位"); + + b.HasKey("LisRequestNo", "ItemId") + .HasName("pk_import_lis_result"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_import_lis_result"); + + b.ToTable("import_lis_result"); + + b.HasComment("检验结果中间表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ImportPacsPicture", b => + { + b.Property("CheckRequestNo") + .HasColumnType("uuid") + .HasColumnName("check_request_no"); + + b.Property("PictureFilename") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("picture_filename") + .HasComment("检查部位"); + + b.Property("AsbitemNames") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("asbitem_names") + .HasComment("组合项目名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("诊断结论"); + + b.Property("ImportTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasComment("导入日期"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print") + .HasComment("检查所见"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no"); + + b.HasKey("CheckRequestNo", "PictureFilename") + .HasName("pk_import_pacs_picture_1"); + + b.ToTable("import_pacs_picture"); + + b.HasComment("pacs图片中间表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ImportPacsResult", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AsbitemNames") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("asbitem_names") + .HasComment("组合项目名称"); + + b.Property("CheckDoctorName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CheckItems") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("check_items") + .HasComment("检查部位"); + + b.Property("CheckTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("check_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("检查日期"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("description") + .HasComment("检查所见"); + + b.Property("ImportTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("导入日期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no"); + + b.Property("Suggestion") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("suggestion") + .HasComment("建议"); + + b.Property("Summary") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("summary") + .HasComment("诊断结论"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_import_pacs_result"); + + b.ToTable("import_pacs_result"); + + b.HasComment("PACS结果中间表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.InvoiceItemType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_invoice_item_type") + .IsUnique(); + + b.ToTable("invoice_item_type"); + + b.HasComment("发票项目类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.InvoiceOrg", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_invoice_org") + .IsUnique(); + + b.ToTable("invoice_org"); + + b.HasComment("发票单位设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Item", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CalculationFunction") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("calculation_function"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DefaultResult") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("default_result"); + + b.Property("DiagnosisFunction") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("diagnosis_function"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("EnglishShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("english_short_name"); + + b.Property("InputCheck") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("input_check"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("IsCalculationItem") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_calculation_item"); + + b.Property("IsContinueProcess") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_continue_process"); + + b.Property("IsDiagnosisFunction") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_diagnosis_function"); + + b.Property("IsNameIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_into_summary"); + + b.Property("IsProduceSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_produce_summary"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price"); + + b.Property("PriceItemId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("price_item_id") + .IsFixedLength(); + + b.Property("ReferenceRangeTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("reference_range_type_flag") + .HasDefaultValueSql("'E'::bpchar"); + + b.Property("ResultTemplateTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("result_template_type_flag") + .HasDefaultValueSql("0"); + + b.Property("SimpleCode") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("simple_code"); + + b.Property("UnitId") + .HasColumnType("uuid") + .HasColumnName("unit_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_item") + .IsUnique(); + + b.ToTable("item"); + + b.HasComment("项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemDefaultResult", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_item_default_result") + .IsUnique(); + + b.ToTable("item_default_result"); + + b.HasComment("项目默认结果设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultMatch", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("结果匹配编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断编号"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Result") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("result") + .HasComment("结果"); + + b.HasKey("Id"); + + b.HasIndex("DiagnosisId"); + + b.HasIndex("ItemId"); + + b.ToTable("item_result_match"); + + b.HasComment("结果匹配设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("结果模板编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断编号"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("IsNameIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_into_summary") + .HasComment("小结前是否加名称"); + + b.Property("IsResultIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_result_into_summary"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("ItemResultTemplateTypeId") + .HasColumnType("uuid") + .HasColumnName("item_result_template_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Result") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("ResultStatusId") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("result_status_id") + .HasComment("结果状态"); + + b.Property("SimpleCode") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ItemId", "Result" }, "ix_item_result_template") + .IsUnique(); + + b.ToTable("item_result_template"); + + b.HasComment("项目结果模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplateType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ItemId", "DisplayName" }, "ix_item_result_template_type") + .IsUnique(); + + b.ToTable("item_result_template_type"); + + b.HasComment("项目结果模板类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_item_template") + .IsUnique(); + + b.ToTable("item_template"); + + b.HasComment("项目模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplateDetail", b => + { + b.Property("ItemTemplateId") + .HasColumnType("uuid") + .HasColumnName("item_template_id") + .IsFixedLength(); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.HasKey("ItemTemplateId", "ItemId") + .HasName("pk_item_template_detail"); + + b.HasIndex("ItemId"); + + b.ToTable("item_template_detail"); + + b.HasComment("项目模板明细"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CheckTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("check_type_flag") + .HasDefaultValueSql("'G'::bpchar"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("GuidTypeId") + .HasColumnType("uuid") + .HasColumnName("guid_type_id") + .IsFixedLength(); + + b.Property("IsMergeAsbitem") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_merge_asbitem"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MedicalReportTypeId") + .HasColumnType("uuid") + .HasColumnName("medical_report_type_id") + .IsFixedLength(); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("path_code"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("GuidTypeId"); + + b.HasIndex("MedicalReportTypeId"); + + b.HasIndex(new[] { "DisplayName", "ParentId" }, "ix_item_type") + .IsUnique(); + + b.ToTable("item_type"); + + b.HasComment("项目类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.LisRequest", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print"); + + b.Property("IsSignIn") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_sign_in"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LisRequestNo") + .HasColumnType("uuid") + .HasColumnName("lis_request_no"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("SampleContainerId") + .HasColumnType("uuid") + .HasColumnName("sample_container_id") + .IsFixedLength(); + + b.Property("SampleTypeId") + .HasColumnType("uuid") + .HasColumnName("sample_type_id") + .IsFixedLength(); + + b.Property("Sampler") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("sampler"); + + b.Property("SamplingTime") + .HasColumnType("date") + .HasColumnName("sampling_time"); + + b.Property("SignInOrder") + .HasColumnType("integer") + .HasColumnName("sign_in_order"); + + b.Property("SignInPerson") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("sign_in_person"); + + b.Property("SignInTime") + .HasColumnType("date") + .HasColumnName("sign_in_time"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.HasIndex("SampleContainerId"); + + b.HasIndex("SampleTypeId"); + + b.HasIndex(new[] { "LisRequestNo" }, "ix_lis_request") + .IsUnique(); + + b.ToTable("lis_request"); + + b.HasComment("检验申请单"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MaritalStatus", b => + { + b.Property("MaritalStatusId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("婚姻状况编号"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name") + .HasComment("婚姻状况名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("MaritalStatusId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_marital_status") + .IsUnique(); + + b.ToTable("marital_status"); + + b.HasComment("婚姻状况设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("体检结论编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("体检结论名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MedicalConclusionTypeId") + .HasColumnType("uuid") + .HasColumnName("medical_conclusion_type_id") + .IsFixedLength(); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex("MedicalConclusionTypeId"); + + b.ToTable("medical_conclusion"); + + b.HasComment("体检结论设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusionType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_conclusion_type") + .IsUnique(); + + b.ToTable("medical_conclusion_type"); + + b.HasComment("体检结论类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackage", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("套餐主档编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasComment("启用标志"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_package") + .IsUnique(); + + b.ToTable("medical_package"); + + b.HasComment("体检套餐主档设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackageDetail", b => + { + b.Property("MedicalPackageId") + .HasColumnType("uuid") + .HasColumnName("medical_package_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.HasKey("MedicalPackageId", "AsbitemId") + .HasName("pk_medical_package_detail"); + + b.HasIndex("AsbitemId"); + + b.ToTable("medical_package_detail"); + + b.HasComment("体检套餐包含的组合项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalReportType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("medical_report_type"); + + b.HasComment("体检报告类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("体检类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("体检类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_type") + .IsUnique(); + + b.ToTable("medical_type"); + + b.HasComment("体检类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Nation", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CountryCode") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("country_code"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_nation") + .IsUnique(); + + b.ToTable("nation"); + + b.HasComment("民族设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OcCheckType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("职业病检查类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OcCheckTypeName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("oc_check_type_name") + .HasComment("职业病检查类别名称"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("oc_check_type"); + + b.HasComment("职业病检查类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OperateLog", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ComputerName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("computer_name"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OperateContent") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("operate_content"); + + b.Property("OperateTime") + .HasColumnType("date") + .HasColumnName("operate_time"); + + b.Property("OperateType") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("operate_type"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("Sqlsyntax") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sqlsyntax"); + + b.Property("TableName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("table_name"); + + b.Property("UserId") + .HasMaxLength(16) + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("WindowName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("window_name"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ComputerName" }, "ix_operate_log"); + + b.HasIndex(new[] { "WindowName" }, "ix_operate_log_1"); + + b.ToTable("operate_log"); + + b.HasComment("操作日志"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OrganizationUnitsCustomerOrg", b => + { + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength(); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength(); + + b.HasKey("CustomerOrgId", "OrganizationUnitId") + .HasName("pk_medical_center_org"); + + b.HasIndex("OrganizationUnitId"); + + b.ToTable("organization_units_customer_org"); + + b.HasComment("体检中心单位权限"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Patient", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Address") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("address"); + + b.Property("BirthDate") + .HasColumnType("date") + .HasColumnName("birth_date"); + + b.Property("BirthPlaceId") + .HasColumnType("uuid") + .HasColumnName("birth_place_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("email"); + + b.Property("IdNo") + .HasMaxLength(18) + .HasColumnType("character varying(18)") + .HasColumnName("id_no"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MaritalStatusId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id"); + + b.Property("MobileTelephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("mobile_telephone"); + + b.Property("NationId") + .HasColumnType("uuid") + .HasColumnName("nation_id") + .IsFixedLength(); + + b.Property("PatientPassword") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("patient_password"); + + b.Property("PostalCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("postal_code"); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id"); + + b.Property("Telephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("telephone"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "IdNo" }, "ix_patient"); + + b.HasIndex(new[] { "DisplayName" }, "ix_patient_1"); + + b.ToTable("patient"); + + b.HasComment("体检人员档案"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalDisease", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AbnormalTimes") + .HasColumnType("integer") + .HasColumnName("abnormal_times"); + + b.Property("AbortionTimes") + .HasColumnType("integer") + .HasColumnName("abortion_times"); + + b.Property("ChildrenNum") + .HasColumnType("integer") + .HasColumnName("children_num"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisDate") + .HasColumnType("date") + .HasColumnName("diagnosis_date"); + + b.Property("DiagnosisHospital") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("diagnosis_hospital"); + + b.Property("DrinkFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("drink_flag"); + + b.Property("DrinkNum") + .HasColumnType("integer") + .HasColumnName("drink_num"); + + b.Property("DrinkYears") + .HasColumnType("integer") + .HasColumnName("drink_years"); + + b.Property("FirstMenstruation") + .HasColumnType("integer") + .HasColumnName("first_menstruation"); + + b.Property("HandleSuggestion") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("handle_suggestion"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MenstrualHistory") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("menstrual_history"); + + b.Property("MenstruationCycle") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("menstruation_cycle"); + + b.Property("MenstruationEndAge") + .HasColumnType("integer") + .HasColumnName("menstruation_end_age"); + + b.Property("MenstruationFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("menstruation_flag"); + + b.Property("MenstruationTimeLength") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("menstruation_time_length"); + + b.Property("NoOccupAbSuggestion") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_occup_ab_suggestion"); + + b.Property("NoOccupationalAbnormal") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_occupational_abnormal"); + + b.Property("OcCheckTypeId") + .HasColumnType("uuid") + .HasColumnName("oc_check_type_id") + .IsFixedLength(); + + b.Property("OccupationalAbSuggestion") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("occupational_ab_suggestion"); + + b.Property("OccupationalAbnormal") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("occupational_abnormal"); + + b.Property("OccupationalDisease") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("occupational_disease"); + + b.Property("Other") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("other"); + + b.Property("PoisonWorkTime") + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("poison_work_time"); + + b.Property("PrematureBirthTimes") + .HasColumnType("integer") + .HasColumnName("premature_birth_times"); + + b.Property("PreviousHistory") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("previous_history"); + + b.Property("Recovery") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("recovery"); + + b.Property("SmokeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("smoke_flag"); + + b.Property("SmokeNum") + .HasColumnType("integer") + .HasColumnName("smoke_num"); + + b.Property("SmokeYears") + .HasColumnType("integer") + .HasColumnName("smoke_years"); + + b.Property("StillbirthTimes") + .HasColumnType("integer") + .HasColumnName("stillbirth_times"); + + b.Property("TotalWorkTime") + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("total_work_time"); + + b.HasKey("Id"); + + b.ToTable("patient_occupational_disease"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalHistory", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("BeginDate") + .HasColumnType("date") + .HasColumnName("begin_date"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("EndDate") + .HasColumnType("date") + .HasColumnName("end_date"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Org") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("org"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("Poison") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("poison"); + + b.Property("ProtectiveMeasures") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("protective_measures"); + + b.Property("WorkShop") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("work_shop"); + + b.Property("WorkType") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("work_type"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("patient_occupational_history"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientPoison", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("PoisonId") + .HasColumnType("uuid") + .HasColumnName("poison_id") + .IsFixedLength(); + + b.HasKey("PatientRegisterId", "PoisonId") + .HasName("pk_patient_poison"); + + b.HasIndex("PoisonId"); + + b.ToTable("patient_poison"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("登记流水号"); + + b.Property("Age") + .HasColumnType("smallint") + .HasColumnName("age") + .HasComment("年龄"); + + b.Property("AuditDate") + .HasColumnType("date") + .HasColumnName("audit_date"); + + b.Property("AuditDoctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("audit_doctor"); + + b.Property("BirthDate") + .HasColumnType("date") + .HasColumnName("birth_date"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("完成标志"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgGroupId") + .HasColumnType("uuid") + .HasColumnName("customer_org_group_id") + .IsFixedLength() + .HasComment("分组"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("单位编号"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id"); + + b.Property("GuidePrintTimes") + .HasColumnType("smallint") + .HasColumnName("guide_print_times"); + + b.Property("InterposeMeasure") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("interpose_measure") + .HasComment("干预措施"); + + b.Property("IsAudit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_audit"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock"); + + b.Property("IsMedicalStart") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_medical_start") + .HasComment("体检开始标志"); + + b.Property("IsNameHide") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_hide"); + + b.Property("IsPhoneFollow") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_phone_follow"); + + b.Property("IsRecoverGuide") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_recover_guide"); + + b.Property("IsUpload") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_upload"); + + b.Property("IsVip") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_vip"); + + b.Property("JobCardNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_card_no") + .HasComment("工卡号"); + + b.Property("JobPost") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("job_post") + .HasComment("职务"); + + b.Property("JobTitle") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("job_title") + .HasComment("职称"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MaritalStatusId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("婚姻状况"); + + b.Property("MedicalCardNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("medical_card_no"); + + b.Property("MedicalConclusionId") + .HasColumnType("uuid") + .HasColumnName("medical_conclusion_id") + .IsFixedLength() + .HasComment("体检结论"); + + b.Property("MedicalPackageId") + .HasColumnType("uuid") + .HasColumnName("medical_package_id") + .IsFixedLength() + .HasComment("套餐"); + + b.Property("MedicalStartDate") + .ValueGeneratedOnAdd() + .HasColumnType("date") + .HasColumnName("medical_start_date") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("体检开始日期"); + + b.Property("MedicalTimes") + .HasColumnType("smallint") + .HasColumnName("medical_times") + .HasComment("体检次数"); + + b.Property("MedicalTypeId") + .HasColumnType("uuid") + .HasColumnName("medical_type_id") + .IsFixedLength() + .HasComment("体检类别"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id"); + + b.Property("PatientId") + .HasColumnType("uuid") + .HasColumnName("patient_id") + .HasComment("档案号"); + + b.Property("PatientName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("patient_name") + .HasComment("姓名"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no") + .HasComment("条码号"); + + b.Property("PersonnelTypeId") + .HasColumnType("uuid") + .HasColumnName("personnel_type_id") + .IsFixedLength() + .HasComment("人员类别"); + + b.Property("Photo") + .HasColumnType("bytea") + .HasColumnName("photo") + .HasComment("照片"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("ReportPrintTimes") + .HasColumnType("smallint") + .HasColumnName("report_print_times") + .HasComment("体检报告打印次数"); + + b.Property("Salesman") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("salesman") + .HasComment("介绍人"); + + b.Property("SexHormoneTermId") + .HasColumnType("uuid") + .HasColumnName("sex_hormone_term_id") + .IsFixedLength(); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id") + .HasComment("性别"); + + b.Property("SummaryDate") + .HasColumnType("date") + .HasColumnName("summary_date") + .HasComment("总检日期"); + + b.Property("SummaryDoctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("summary_doctor") + .HasComment("总检医生"); + + b.Property("ThirdInfo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("third_info"); + + b.HasKey("Id"); + + b.HasIndex("MaritalStatusId"); + + b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_patient_register_org_register"); + + b.HasIndex(new[] { "OrganizationUnitId" }, "fki_fk_patient_register_ororganization_unit"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_patient_register") + .IsUnique(); + + b.HasIndex(new[] { "PatientId", "MedicalTimes" }, "ix_patient_register_1") + .IsUnique(); + + b.HasIndex(new[] { "PatientName" }, "ix_patient_register_2"); + + b.ToTable("patient_register"); + + b.HasComment("体检登记主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientSymptom", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("SymptomId") + .HasColumnType("uuid") + .HasColumnName("symptom_id") + .IsFixedLength(); + + b.Property("Degree") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("degree"); + + b.Property("TimeLength") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("time_length"); + + b.HasKey("PatientRegisterId", "SymptomId") + .HasName("pk_patient_symptom"); + + b.HasIndex("SymptomId"); + + b.ToTable("patient_symptom"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PayMode", b => + { + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("PayModeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_payment_mode") + .IsUnique(); + + b.ToTable("pay_mode"); + + b.HasComment("支付方式设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PersonnelType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("人员类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("人员类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_personnel_type") + .IsUnique(); + + b.ToTable("personnel_type"); + + b.HasComment("人员类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PhoneFollow", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("FollowContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("follow_content"); + + b.Property("FollowUpPlanId") + .HasColumnType("uuid") + .HasColumnName("follow_up_plan_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("ReplyContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("reply_content"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("phone_follow"); + + b.HasComment("电话随访"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Poison", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("毒害编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("毒害名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PoisonTypeId") + .HasColumnType("uuid") + .HasColumnName("poison_type_id") + .IsFixedLength(); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("PoisonTypeId"); + + b.ToTable("poison"); + + b.HasComment("毒害因素设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PoisonType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("毒害类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("毒害类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("poison_type"); + + b.HasComment("毒害因素类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PositionType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("职务编号"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("职务名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime") + .HasComment("最后修改日期"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId") + .HasComment("最后修改者"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_position_type") + .IsUnique(); + + b.ToTable("position_type"); + + b.HasComment("职务类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("InvoiceItemTypeId") + .HasColumnType("uuid") + .HasColumnName("invoice_item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price"); + + b.Property("PriceItemCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("price_item_code"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("InvoiceItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_price_item") + .IsUnique(); + + b.ToTable("price_item"); + + b.HasComment("价表项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PrimarykeyBuilder", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("主键编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DateString") + .HasMaxLength(8) + .HasColumnType("character(8)") + .HasColumnName("date_string") + .IsFixedLength() + .HasComment("日期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SerialNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("serial_no") + .HasComment("序列号"); + + b.HasKey("Id"); + + b.ToTable("primarykey_builder"); + + b.HasComment("主键产生器"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.QueueRegister", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CallTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("call_time"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("0"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("NoCompleteReason") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_complete_reason") + .HasDefaultValueSql("0"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("RoomId") + .HasColumnType("uuid") + .HasColumnName("room_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("queue_register"); + + b.HasComment("排队登记"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReferenceRange", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("参考范围编号"); + + b.Property("AgeLowerLimit") + .HasColumnType("smallint") + .HasColumnName("age_lower_limit") + .HasComment("年龄下限"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("200") + .HasComment("年龄上限"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("性别"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LowerDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("lower_diagnosis_id") + .IsFixedLength() + .HasComment("偏低诊断"); + + b.Property("ReferenceRangeValue") + .HasMaxLength(150) + .HasColumnType("character varying(150)") + .HasColumnName("reference_range_value"); + + b.Property("UpperDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("upper_diagnosis_id") + .IsFixedLength() + .HasComment("偏高诊断"); + + b.HasKey("Id"); + + b.HasIndex("ItemId"); + + b.ToTable("reference_range"); + + b.HasComment("项目参考范围设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterAsbitem", b => + { + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("AsbitemId") + .HasMaxLength(6) + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price") + .HasComment("实收价格"); + + b.Property("IsCharge") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_charge") + .HasComment("是否已收费"); + + b.Property("LisRequestId") + .HasMaxLength(20) + .HasColumnType("uuid") + .HasColumnName("lis_request_id"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("登记流水号"); + + b.Property("PayTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("pay_type_flag") + .HasDefaultValueSql("0") + .HasComment("支付方式,比如是自费、免费、单位支付"); + + b.Property("RegisterAsbitemId") + .HasColumnType("uuid") + .HasColumnName("register_asbitem_id"); + + b.Property("StandardPrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("standard_price") + .HasComment("标准价格"); + + b.HasKey("RegisterCheckId", "AsbitemId") + .HasName("pk_register_asbitem"); + + b.HasIndex("AsbitemId"); + + b.HasIndex(new[] { "PatientRegisterId", "AsbitemId" }, "ix_register_asbitem") + .IsUnique(); + + b.ToTable("register_asbitem"); + + b.HasComment("检查组合项目记录"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheck", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AuditTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("audit_time"); + + b.Property("AuditorUserId") + .HasColumnType("uuid") + .HasColumnName("auditor_user_id"); + + b.Property("CheckDate") + .HasColumnType("date") + .HasColumnName("check_date"); + + b.Property("CheckDoctorId") + .HasColumnType("uuid") + .HasColumnName("check_doctor_id"); + + b.Property("CheckRequestNo") + .HasMaxLength(20) + .HasColumnType("uuid") + .HasColumnName("check_request_no"); + + b.Property("CheckRequestPrintTimes") + .HasColumnType("smallint") + .HasColumnName("check_request_print_times"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("0"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value"); + + b.Property("CriticalValueCreateDate") + .HasColumnType("date") + .HasColumnName("critical_value_create_date"); + + b.Property("CriticalValueFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("critical_value_flag") + .HasDefaultValueSql("0"); + + b.Property("CriticalValueProcessContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value_process_content"); + + b.Property("CriticalValueProcessDate") + .HasColumnType("date") + .HasColumnName("critical_value_process_date"); + + b.Property("CriticalValueProcessDoctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("critical_value_process_doctor"); + + b.Property("CriticalValueProcessFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("critical_value_process_flag"); + + b.Property("IsAudit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_audit"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ThirdInfo") + .HasMaxLength(80) + .HasColumnType("character varying(80)") + .HasColumnName("third_info"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CheckRequestNo" }, "ix_register_check_1"); + + b.ToTable("register_check"); + + b.HasComment("登记检查单"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckCriticalValue", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value"); + + b.Property("Doctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("doctor"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ProcessTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("process_type_flag"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.HasKey("Id"); + + b.ToTable("register_check_critical_value"); + + b.HasComment("检查危急值"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckItem", b => + { + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目"); + + b.Property("CheckDate") + .HasColumnType("date") + .HasColumnName("check_date") + .HasComment("检查日期"); + + b.Property("CheckDoctorName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value"); + + b.Property("ReferenceRangeValue") + .ValueGeneratedOnAdd() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("reference_range_value") + .HasDefaultValueSql("''::character varying") + .HasComment("参考范围"); + + b.Property("Result") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("ResultStatusId") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("result_status_id") + .HasComment("报告单提示"); + + b.Property("Unit") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("unit"); + + b.HasKey("RegisterCheckId", "ItemId") + .HasName("pk_register_item_1"); + + b.HasIndex("ItemId"); + + b.HasIndex("ResultStatusId"); + + b.ToTable("register_check_item"); + + b.HasComment("检查明细项目记录"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckPicture", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("检查图片编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print") + .HasComment("打印标志"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PictureFilename") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("picture_filename") + .HasComment("图片名"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记流水号"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "RegisterCheckId", "PictureFilename" }, "ix_check_picture") + .IsUnique(); + + b.ToTable("register_check_picture"); + + b.HasComment("体检登记组合项目图片"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSuggestion", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("Suggestion") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion"); + + b.HasKey("Id"); + + b.HasIndex("RegisterCheckId"); + + b.ToTable("register_check_suggestion"); + + b.HasComment("登记检查建议"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSummary", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("Summary") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("summary"); + + b.Property("SummaryFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("summary_flag"); + + b.HasKey("Id"); + + b.HasIndex("RegisterCheckId"); + + b.ToTable("register_check_summary"); + + b.HasComment("登记检查综述"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ResultStatus", b => + { + b.Property("ResultStatusId") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("result_status_id"); + + b.Property("DataInputBackgroundColor") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("data_input_background_color") + .HasDefaultValueSql("16777215"); + + b.Property("DataInputFontColor") + .HasColumnType("integer") + .HasColumnName("data_input_font_color"); + + b.Property("DataInputPrompt") + .HasMaxLength(8) + .HasColumnType("character varying(8)") + .HasColumnName("data_input_prompt"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("ReportBackgroundColor") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("report_background_color") + .HasDefaultValueSql("16777215"); + + b.Property("ReportFontColor") + .HasColumnType("integer") + .HasColumnName("report_font_color"); + + b.Property("ReportPrompt") + .HasMaxLength(8) + .HasColumnType("character varying(8)") + .HasColumnName("report_prompt"); + + b.HasKey("ResultStatusId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_result_status") + .IsUnique(); + + b.ToTable("result_status"); + + b.HasComment("结果状态设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Room", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RoomTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("room_type_flag") + .HasDefaultValueSql("0"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_room") + .IsUnique(); + + b.ToTable("room"); + + b.HasComment("房间设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleContainer", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("ContainerColor") + .HasColumnType("integer") + .HasColumnName("container_color"); + + b.Property("ContainerColorName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("container_color_name"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_container") + .IsUnique(); + + b.ToTable("sample_container"); + + b.HasComment("标本容器设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SampleContainerId") + .HasColumnType("uuid") + .HasColumnName("sample_container_id") + .IsFixedLength(); + + b.Property("SampleTypeId") + .HasColumnType("uuid") + .HasColumnName("sample_type_id") + .IsFixedLength(); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("SampleContainerId"); + + b.HasIndex("SampleTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_group") + .IsUnique(); + + b.ToTable("sample_group"); + + b.HasComment("标本分组设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroupDetail", b => + { + b.Property("SampleGroupId") + .HasColumnType("uuid") + .HasColumnName("sample_group_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.HasKey("SampleGroupId", "AsbitemId") + .HasName("pk_sample_group_detail"); + + b.HasIndex(new[] { "AsbitemId" }, "ix_sample_group_detail") + .IsUnique(); + + b.ToTable("sample_group_detail"); + + b.HasComment("标本分组包含组合项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_type"); + + b.ToTable("sample_type"); + + b.HasComment("标本类型设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ServiceTrade", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("ValidPeriod") + .HasColumnType("smallint") + .HasColumnName("valid_period") + .HasComment("有效期"); + + b.Property("ValidPeriodDisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("valid_period_display_name"); + + b.Property("ValidPeriodUnit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("valid_period_unit"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DepartmentId", "DisplayName" }, "ix_service_trades") + .IsUnique(); + + b.ToTable("service_trades"); + + b.HasComment("服务行业设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SettleAccount", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CompletedBy") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("completed_by"); + + b.Property("CompletedTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("completed_time"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.ToTable("settle_account"); + + b.HasComment("结账"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Sex", b => + { + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code"); + + b.HasKey("SexId"); + + b.ToTable("sex"); + + b.HasComment("性别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneReferenceRange", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("AgeLowerLimit") + .HasColumnType("smallint") + .HasColumnName("age_lower_limit"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("200"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LowerDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("lower_diagnosis_id") + .IsFixedLength(); + + b.Property("ReferenceRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("reference_range_value"); + + b.Property("SexHormoneTermId") + .HasColumnType("uuid") + .HasColumnName("sex_hormone_term_id") + .IsFixedLength(); + + b.Property("UpperDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("upper_diagnosis_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("ItemId"); + + b.HasIndex("SexHormoneTermId"); + + b.ToTable("sex_hormone_reference_range"); + + b.HasComment("性激素参考范围设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneTerm", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sex_hormone_term") + .IsUnique(); + + b.ToTable("sex_hormone_term"); + + b.HasComment("性激素期限设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsSend", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("FollowUpPlanId") + .HasColumnType("uuid") + .HasColumnName("follow_up_plan_id"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MobileTelephone") + .HasMaxLength(11) + .HasColumnType("character varying(11)") + .HasColumnName("mobile_telephone"); + + b.Property("PatientId") + .HasColumnType("uuid") + .HasColumnName("patient_id"); + + b.Property("PatientName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("patient_name"); + + b.Property("SmsTypeId") + .HasColumnType("uuid") + .HasColumnName("sms_type_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.ToTable("sms_send"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("SmsTypeId") + .HasColumnType("uuid") + .HasColumnName("sms_type_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.ToTable("sms_template"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sms_type"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Suggestion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength(); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SuggestionContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("suggestion_content"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DiagnosisId", "SuggestionContent" }, "ix_suggestion") + .IsUnique(); + + b.ToTable("suggestion"); + + b.HasComment("建议设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumDiagnosis", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength(); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SumSuggestionHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_suggestion_header_id"); + + b.HasKey("PatientRegisterId", "DiagnosisId") + .HasName("pk_summary_diagnosis"); + + b.HasIndex("DiagnosisId"); + + b.ToTable("sum_diagnosis"); + + b.HasComment("总检诊断"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SummaryTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("TemplateContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("template_content"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_summary_template") + .IsUnique(); + + b.ToTable("summary_template"); + + b.HasComment("综述模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionContent", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SuggestionContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_content"); + + b.Property("SumSuggestionHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_suggestion_header_id"); + + b.HasKey("Id"); + + b.HasIndex("SumSuggestionHeaderId"); + + b.ToTable("sum_suggestion_content"); + + b.HasComment("总检建议内容"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionHeader", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("SuggestionFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("suggestion_flag"); + + b.Property("SuggestionTitle") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_title"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PatientRegisterId", "SuggestionTitle" }, "ix_sum_suggestion_title") + .IsUnique(); + + b.ToTable("sum_suggestion_header"); + + b.HasComment("总检建议头"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryContent", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SumSummaryHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_summary_header_id"); + + b.Property("SummaryContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("summary_content"); + + b.HasKey("Id"); + + b.HasIndex("SumSummaryHeaderId"); + + b.ToTable("sum_summary_content"); + + b.HasComment("总检综述内容"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryHeader", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("SummaryFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("summary_flag"); + + b.Property("SummaryTitle") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("summary_title"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("sum_summary_header"); + + b.HasComment("总检综述头"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Symptom", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("症状编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("症状名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("symptom"); + + b.HasComment("症状"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Sysdiagram", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Definition") + .HasColumnType("bytea") + .HasColumnName("definition"); + + b.Property("DisplayName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("display_name"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PrincipalId") + .HasColumnType("uuid") + .HasColumnName("principal_id"); + + b.Property("Version") + .HasColumnType("integer") + .HasColumnName("version"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PrincipalId", "DisplayName" }, "uk_principal_name") + .IsUnique(); + + b.ToTable("sysdiagrams"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("SysParmTypeId") + .HasColumnType("uuid") + .HasColumnName("sys_parm_type_id"); + + b.Property("ValueType") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("value_type"); + + b.HasKey("Id"); + + b.HasIndex("SysParmTypeId"); + + b.ToTable("sys_parm"); + + b.HasComment("系统参数设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmType", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sys_parm_type"); + + b.HasComment("系统参数类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValue", b => + { + b.Property("SysParmId") + .HasColumnType("uuid") + .HasColumnName("sys_parm_id"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength(); + + b.Property("ParmValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("parm_value"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark"); + + b.HasKey("SysParmId", "OrganizationUnitId") + .HasName("pk_sys_parm_value"); + + b.ToTable("sys_parm_value"); + + b.HasComment("系统参数值设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValueOption", b => + { + b.Property("SysParmId") + .HasColumnType("uuid") + .HasColumnName("sys_parm_id"); + + b.Property("ValueOption") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("value_option"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("ValueOptionName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("value_option_name"); + + b.HasKey("SysParmId", "ValueOption") + .HasName("pk_sys_parm_value_option"); + + b.ToTable("sys_parm_value_option"); + + b.HasComment("系统参数可选值设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.TitleType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("职称类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("职称类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_title_type") + .IsUnique(); + + b.ToTable("title_type"); + + b.HasComment("职称类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Unit", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("unit"); + + b.HasComment("单位设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.User", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Address") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("address"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("email"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LockScreenTimeInterval") + .HasColumnType("integer") + .HasColumnName("lock_screen_time_interval"); + + b.Property("ModifiedDate") + .ValueGeneratedOnAdd() + .HasColumnType("date") + .HasColumnName("modified_date") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("Modifier") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("modifier"); + + b.Property("PasswordHash") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("password_hash"); + + b.Property("PasswordSalt") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("password_salt"); + + b.Property("Photo") + .HasColumnType("bytea") + .HasColumnName("photo"); + + b.Property("PositionTypeId") + .HasColumnType("uuid") + .HasColumnName("position_type_id"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("Telephone") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("telephone"); + + b.Property("TitleTypeId") + .HasColumnType("uuid") + .HasColumnName("title_type_id"); + + b.Property("UserTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("user_type_flag") + .HasDefaultValueSql("0") + .HasComment("用户类型"); + + b.HasKey("Id"); + + b.HasIndex("DepartmentId"); + + b.ToTable("users"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserDepartment", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.HasKey("UserId", "DepartmentId") + .HasName("pk_user_operate_department"); + + b.HasIndex("DepartmentId"); + + b.ToTable("user_department"); + + b.HasComment("用户科室操作权限"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserGrouping", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("GroupingId") + .HasColumnType("uuid") + .HasColumnName("grouping_id"); + + b.HasKey("UserId", "GroupingId") + .HasName("pk_user_grouping"); + + b.HasIndex("GroupingId"); + + b.ToTable("user_grouping"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserItemType", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.HasKey("UserId", "ItemTypeId") + .HasName("pk_user_item_type"); + + b.HasIndex("ItemTypeId"); + + b.ToTable("user_item_type"); + + b.HasComment("用户项目类别权限设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserRight", b => + { + b.Property("Application") + .HasMaxLength(32) + .HasColumnType("character varying(32)") + .HasColumnName("application"); + + b.Property("WindowName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("window_name"); + + b.Property("ControlName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("control_name"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("IsUser") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_user"); + + b.Property("Status") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("status"); + + b.HasKey("Application", "WindowName", "ControlName", "UserId", "IsUser") + .HasName("pk_sys_function"); + + b.ToTable("user_rights"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasColumnType("text"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("integer") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("uuid") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorTenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ImpersonatorTenantName"); + + b.Property("ImpersonatorUserId") + .HasColumnType("uuid") + .HasColumnName("ImpersonatorUserId"); + + b.Property("ImpersonatorUserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("ImpersonatorUserName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("TenantName"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("smallint") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("uuid"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("EntityChangeId") + .HasColumnType("uuid"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("character varying(1048576)"); + + b.Property("JobName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("LastTryTime") + .HasColumnType("timestamp without time zone"); + + b.Property("NextTryTime") + .HasColumnType("timestamp without time zone"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((byte)15); + + b.Property("TryCount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0); + + b.HasKey("Id"); + + b.HasIndex("IsAbandoned", "NextTryTime"); + + b.ToTable("AbpBackgroundJobs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("boolean"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("Required") + .HasColumnType("boolean"); + + b.Property("ValueType") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("SourceTenantId") + .HasColumnType("uuid"); + + b.Property("SourceUserId") + .HasColumnType("uuid"); + + b.Property("TargetTenantId") + .HasColumnType("uuid"); + + b.Property("TargetUserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("boolean") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("boolean") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("boolean") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("boolean") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("timestamp with time zone"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("SecurityStamp"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("character varying(196)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("text"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("character varying(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("ClientSecret") + .HasColumnType("text"); + + b.Property("ClientUri") + .HasColumnType("text"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("text"); + + b.Property("DisplayNames") + .HasColumnType("text"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("text"); + + b.Property("Permissions") + .HasColumnType("text"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("text"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("RedirectUris") + .HasColumnType("text"); + + b.Property("Requirements") + .HasColumnType("text"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("timestamp without time zone"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("Scopes") + .HasColumnType("text"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("character varying(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("text"); + + b.Property("Descriptions") + .HasColumnType("text"); + + b.Property("DisplayName") + .HasColumnType("text"); + + b.Property("DisplayNames") + .HasColumnType("text"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("character varying(200)"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("Resources") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("AuthorizationId") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("timestamp without time zone"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExpirationDate") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Payload") + .HasColumnType("text"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("RedemptionDate") + .HasColumnType("timestamp without time zone"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("character varying(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("character varying(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("uuid"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("ChildDiagnosis", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", null) + .WithMany() + .HasForeignKey("DiagnosisId") + .IsRequired() + .HasConstraintName("fk_child_diagnosis_diagnosis1"); + + b.HasOne("Shentun.Peis.Models.Diagnosis", null) + .WithMany() + .HasForeignKey("ParentDiagnosisId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_child_diagnosis_diagnosis"); + }); + + modelBuilder.Entity("RoomAsbitem", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", null) + .WithMany() + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_asbitem_asbitem"); + + b.HasOne("Shentun.Peis.Models.Room", null) + .WithMany() + .HasForeignKey("RoomId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_asbitem_room"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestB", b => + { + b.HasOne("Shentun.Peis.Books.TestA", "TestAs") + .WithMany("TestBs") + .HasForeignKey("TestAsAId"); + + b.Navigation("TestAs"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => + { + b.HasOne("Shentun.Peis.Models.InvoiceItemType", "InvoiceItemType") + .WithMany("Asbitems") + .HasForeignKey("InvoiceItemTypeId") + .IsRequired() + .HasConstraintName("fk_asbitem_invoice_item_type"); + + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Asbitems") + .HasForeignKey("ItemTypeId") + .IsRequired() + .HasConstraintName("fk_asbitem_item_type"); + + b.Navigation("InvoiceItemType"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("AsbitemDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_asbitem_detail_asbitem"); + + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("AsbitemDetails") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_asbitem_detail_item"); + + b.Navigation("Asbitem"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultConclusion", b => + { + b.HasOne("Shentun.Peis.Models.BigtextResultTemplate", "BigtextResultTemplate") + .WithMany("BigtextResultConclusions") + .HasForeignKey("BigtextResultTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultDescription", b => + { + b.HasOne("Shentun.Peis.Models.BigtextResultTemplate", "BigtextResultTemplate") + .WithMany("BigtextResultDescriptions") + .HasForeignKey("BigtextResultTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultTemplate", b => + { + b.HasOne("Shentun.Peis.Models.BigtextResultType", "BigtextResultType") + .WithMany("BigtextResultTemplates") + .HasForeignKey("BigtextResultTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultType", b => + { + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("BigtextResultTypes") + .HasForeignKey("ItemTypeId") + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardBill", b => + { + b.HasOne("Shentun.Peis.Models.CardRegister", "CardRegister") + .WithMany("CardBills") + .HasForeignKey("CardRegisterId") + .IsRequired() + .HasConstraintName("fk_card_bil_reference_card_reg"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("CardBills") + .HasForeignKey("PayModeId") + .HasConstraintName("fk_card_bill_payment_mode"); + + b.Navigation("CardRegister"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardRegister", b => + { + b.HasOne("Shentun.Peis.Models.CardType", "CardType") + .WithMany("CardRegisters") + .HasForeignKey("CardTypeId") + .IsRequired() + .HasConstraintName("fk_card_reg_reference_card_typ"); + + b.HasOne("Shentun.Peis.Models.Department", "OrganizationUnit") + .WithMany("CardRegisters") + .HasForeignKey("OrganizationUnitId") + .IsRequired() + .HasConstraintName("fk_card_register_department"); + + b.Navigation("CardType"); + + b.Navigation("OrganizationUnit"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Charge", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("Charges") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_patient_register_charge"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeAsbitem", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("ChargeAsbitems") + .HasForeignKey("AsbitemId") + .IsRequired() + .HasConstraintName("fk_charge_asbitem_asbitem"); + + b.HasOne("Shentun.Peis.Models.Charge", "Charge") + .WithMany("ChargeAsbitems") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_charge_asbitem_charge"); + + b.Navigation("Asbitem"); + + b.Navigation("Charge"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBack", b => + { + b.HasOne("Shentun.Peis.Models.Charge", "Charge") + .WithMany("ChargeBacks") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bill_bac_reference_bill"); + + b.Navigation("Charge"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBackPay", b => + { + b.HasOne("Shentun.Peis.Models.ChargeBack", "ChargeBack") + .WithMany("ChargeBackPays") + .HasForeignKey("ChargeBackId") + .IsRequired() + .HasConstraintName("fk_charge_back_pay_charge_back"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("ChargeBackPays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_charge_back_pay_pay_mode"); + + b.Navigation("ChargeBack"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePay", b => + { + b.HasOne("Shentun.Peis.Models.Charge", "Charge") + .WithMany("ChargePays") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_charge_payment_mode_charge"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("ChargePays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_charge_"); + + b.Navigation("Charge"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePriceItem", b => + { + b.HasOne("Shentun.Peis.Models.ChargeAsbitem", "ChargeAsbitem") + .WithMany("ChargePriceItems") + .HasForeignKey("ChargeAsbitemId") + .IsRequired() + .HasConstraintName("fk_charge_asbitem"); + + b.Navigation("ChargeAsbitem"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonChar", b => + { + b.HasOne("Shentun.Peis.Models.CommonCharType", "CommonCharType") + .WithMany("CommonChars") + .HasForeignKey("CommonCharTypeId") + .IsRequired() + .HasConstraintName("fk_common_char_common_char_type"); + + b.Navigation("CommonCharType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactMethod", b => + { + b.HasOne("Shentun.Peis.Models.ContactPerson", "ContactPerson") + .WithMany("ContactMethods") + .HasForeignKey("ContactPersonId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_contact_method_contact"); + + b.Navigation("ContactPerson"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrg", "CustomerOrg") + .WithMany("ContactPeople") + .HasForeignKey("CustomerOrgId") + .IsRequired() + .HasConstraintName("fk_contact_org"); + + b.Navigation("CustomerOrg"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValue", b => + { + b.HasOne("Shentun.Peis.Models.CriticalValueType", "CriticalValueType") + .WithMany("CriticalValues") + .HasForeignKey("CriticalValueTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_critica"); + + b.Navigation("CriticalValueType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgCharge", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgRegister", "CustomerOrgRegister") + .WithMany("CustomerOrgCharges") + .HasForeignKey("CustomerOrgRegisterId") + .IsRequired() + .HasConstraintName("fk_customer_org_charge_register"); + + b.Navigation("CustomerOrgRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBack", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgCharge", "CustomerOrgCharge") + .WithMany("CustomerOrgChargeBacks") + .HasForeignKey("CustomerOrgChargeId") + .IsRequired() + .HasConstraintName("fk_org_charge_back_org_charge"); + + b.Navigation("CustomerOrgCharge"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBackPay", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgChargeBack", "CustomerOrgChargeBack") + .WithMany("CustomerOrgChargeBackPays") + .HasForeignKey("CustomerOrgChargeBackId") + .IsRequired() + .HasConstraintName("fk_org_cha"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("CustomerOrgChargeBackPays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_org_charge_back_pay_pay_mode"); + + b.Navigation("CustomerOrgChargeBack"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargePay", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgCharge", "CustomerOrgCharge") + .WithOne("CustomerOrgChargePay") + .HasForeignKey("Shentun.Peis.Models.CustomerOrgChargePay", "Id") + .IsRequired() + .HasConstraintName("fk_org_charge_pay_org_charge"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("CustomerOrgChargePays") + .HasForeignKey("PayModeId") + .HasConstraintName("fk_org_charge_pay_pay_mode"); + + b.Navigation("CustomerOrgCharge"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroup", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgRegister", "CustomerOrgRegister") + .WithMany("CustomerOrgGroups") + .HasForeignKey("CustomerOrgRegisterId") + .IsRequired() + .HasConstraintName("fk_customer_org_group_register"); + + b.Navigation("CustomerOrgRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroupDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("CustomerOrgGroupDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_group_detail_asbitem"); + + b.HasOne("Shentun.Peis.Models.CustomerOrgGroup", "CustomerOrgGroup") + .WithMany("CustomerOrgGroupDetails") + .HasForeignKey("CustomerOrgGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_group_detail_org_group"); + + b.Navigation("Asbitem"); + + b.Navigation("CustomerOrgGroup"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgRegister", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrg", "CustomerOrg") + .WithMany("CustomerOrgRegisters") + .HasForeignKey("CustomerOrgId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_medi_reference_org"); + + b.Navigation("CustomerOrg"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Diagnosis", b => + { + b.HasOne("Shentun.Peis.Models.DiagnosisLevel", "DiagnosisLevel") + .WithMany("Diagnoses") + .HasForeignKey("DiagnosisLevelId") + .IsRequired() + .HasConstraintName("fk_diagnosis_diagnosis_level"); + + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Diagnoses") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagnosis_item_type"); + + b.Navigation("DiagnosisLevel"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplateDetail", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("DiagnosisTemplateDetails") + .HasForeignKey("DiagnosisId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagnos"); + + b.HasOne("Shentun.Peis.Models.DiagnosisTemplate", "DiagnosisTemplate") + .WithMany("DiagnosisTemplateDetails") + .HasForeignKey("DiagnosisTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagno2"); + + b.Navigation("Diagnosis"); + + b.Navigation("DiagnosisTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.HealthCertificate", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithOne("HealthCertificate") + .HasForeignKey("Shentun.Peis.Models.HealthCertificate", "Id") + .IsRequired() + .HasConstraintName("fk_health_"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Item", b => + { + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Items") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_item_type"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultMatch", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("ItemResultMatches") + .HasForeignKey("DiagnosisId") + .IsRequired() + .HasConstraintName("fk_item_result_match_diagnosis"); + + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemResultMatches") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_res_reference_item1"); + + b.Navigation("Diagnosis"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplate", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemResultTemplates") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_res_reference_item"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplateType", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemResultTemplateTypes") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_re"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplateDetail", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemTemplateDetails") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_template_detail_item"); + + b.HasOne("Shentun.Peis.Models.ItemTemplate", "ItemTemplate") + .WithMany("ItemTemplateDetails") + .HasForeignKey("ItemTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_te"); + + b.Navigation("Item"); + + b.Navigation("ItemTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemType", b => + { + b.HasOne("Shentun.Peis.Models.GuideType", "GuidType") + .WithMany("ItemTypes") + .HasForeignKey("GuidTypeId") + .IsRequired() + .HasConstraintName("fk_item_type_guide_type"); + + b.HasOne("Shentun.Peis.Models.MedicalReportType", "MedicalReportType") + .WithMany("ItemTypes") + .HasForeignKey("MedicalReportTypeId") + .IsRequired() + .HasConstraintName("fk_item_ty"); + + b.Navigation("GuidType"); + + b.Navigation("MedicalReportType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.LisRequest", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("LisRequests") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_lis_request_patient_register"); + + b.HasOne("Shentun.Peis.Models.SampleContainer", "SampleContainer") + .WithMany("LisRequests") + .HasForeignKey("SampleContainerId") + .IsRequired() + .HasConstraintName("fk_lis_request_sample_container"); + + b.HasOne("Shentun.Peis.Models.SampleType", "SampleType") + .WithMany("LisRequests") + .HasForeignKey("SampleTypeId") + .IsRequired() + .HasConstraintName("fk_lis_request_sample_type"); + + b.Navigation("PatientRegister"); + + b.Navigation("SampleContainer"); + + b.Navigation("SampleType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusion", b => + { + b.HasOne("Shentun.Peis.Models.MedicalConclusionType", "MedicalConclusionType") + .WithMany("MedicalConclusions") + .HasForeignKey("MedicalConclusionTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medical"); + + b.Navigation("MedicalConclusionType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackageDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("MedicalPackageDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medical"); + + b.HasOne("Shentun.Peis.Models.MedicalPackage", "MedicalPackage") + .WithMany("MedicalPackageDetails") + .HasForeignKey("MedicalPackageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medica2"); + + b.Navigation("Asbitem"); + + b.Navigation("MedicalPackage"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OrganizationUnitsCustomerOrg", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrg", "CustomerOrg") + .WithMany("OrganizationUnitsCustomerOrgs") + .HasForeignKey("CustomerOrgId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medical_center_org_org"); + + b.HasOne("Shentun.Peis.Models.Department", "OrganizationUnit") + .WithMany("OrganizationUnitsCustomerOrgs") + .HasForeignKey("OrganizationUnitId") + .IsRequired() + .HasConstraintName("fk_medical"); + + b.Navigation("CustomerOrg"); + + b.Navigation("OrganizationUnit"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalDisease", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithOne("PatientOccupationalDisease") + .HasForeignKey("Shentun.Peis.Models.PatientOccupationalDisease", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalHistory", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PatientOccupationalHistories") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_occupat"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientPoison", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PatientPoisons") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.HasOne("Shentun.Peis.Models.Poison", "Poison") + .WithMany("PatientPoisons") + .HasForeignKey("PoisonId") + .IsRequired() + .HasConstraintName("fk_patient_poison_poison"); + + b.Navigation("PatientRegister"); + + b.Navigation("Poison"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgRegister", "CustomerOrgRegister") + .WithMany("PatientRegisters") + .HasForeignKey("CustomerOrgRegisterId") + .IsRequired() + .HasConstraintName("fk_patient_register_org_register"); + + b.HasOne("Shentun.Peis.Models.MaritalStatus", "MaritalStatus") + .WithMany("PatientRegisters") + .HasForeignKey("MaritalStatusId") + .IsRequired() + .HasConstraintName("fk_patient_register_marital_status_id"); + + b.Navigation("CustomerOrgRegister"); + + b.Navigation("MaritalStatus"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientSymptom", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PatientSymptoms") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.HasOne("Shentun.Peis.Models.Symptom", "Symptom") + .WithMany("PatientSymptoms") + .HasForeignKey("SymptomId") + .IsRequired() + .HasConstraintName("fk_patient_symptom_symptom"); + + b.Navigation("PatientRegister"); + + b.Navigation("Symptom"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PhoneFollow", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PhoneFollows") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_phone_f"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Poison", b => + { + b.HasOne("Shentun.Peis.Models.PoisonType", "PoisonType") + .WithMany("Poisons") + .HasForeignKey("PoisonTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_poison_poison_type"); + + b.Navigation("PoisonType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PriceItem", b => + { + b.HasOne("Shentun.Peis.Models.InvoiceItemType", "InvoiceItemType") + .WithMany("PriceItems") + .HasForeignKey("InvoiceItemTypeId") + .IsRequired() + .HasConstraintName("fk_price_item_invoice_item_type"); + + b.Navigation("InvoiceItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.QueueRegister", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("QueueRegisters") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_queue_r"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReferenceRange", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ReferenceRanges") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_referenc_reference_item"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterAsbitem", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("RegisterAsbitems") + .HasForeignKey("AsbitemId") + .IsRequired() + .HasConstraintName("fk_register_reference_asbitem"); + + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("RegisterAsbitems") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_register_reference_patient_"); + + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterAsbitems") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registe"); + + b.Navigation("Asbitem"); + + b.Navigation("PatientRegister"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckItem", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("RegisterCheckItems") + .HasForeignKey("ItemId") + .IsRequired() + .HasConstraintName("fk_register_reference_item"); + + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckItems") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_register_item_register_check"); + + b.HasOne("Shentun.Peis.Models.ResultStatus", "ResultStatus") + .WithMany("RegisterCheckItems") + .HasForeignKey("ResultStatusId") + .HasConstraintName("fk_register_item_result_status"); + + b.Navigation("Item"); + + b.Navigation("RegisterCheck"); + + b.Navigation("ResultStatus"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckPicture", b => + { + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckPictures") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_check_picture_register_check"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSuggestion", b => + { + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckSuggestions") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registe"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSummary", b => + { + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckSummaries") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registe"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Room", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("Rooms") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_department"); + + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Rooms") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_item_type"); + + b.Navigation("Department"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => + { + b.HasOne("Shentun.Peis.Models.SampleContainer", "SampleContainer") + .WithMany("SampleGroups") + .HasForeignKey("SampleContainerId") + .IsRequired() + .HasConstraintName("fk_sample_"); + + b.HasOne("Shentun.Peis.Models.SampleType", "SampleType") + .WithMany("SampleGroups") + .HasForeignKey("SampleTypeId") + .IsRequired() + .HasConstraintName("fk_sample_group_sample_type"); + + b.Navigation("SampleContainer"); + + b.Navigation("SampleType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroupDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithOne("SampleGroupDetail") + .HasForeignKey("Shentun.Peis.Models.SampleGroupDetail", "AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sample_group_detail_asbitem"); + + b.HasOne("Shentun.Peis.Models.SampleGroup", "SampleGroup") + .WithMany("SampleGroupDetails") + .HasForeignKey("SampleGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sample_"); + + b.Navigation("Asbitem"); + + b.Navigation("SampleGroup"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ServiceTrade", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("ServiceTrades") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_service_trades_department"); + + b.Navigation("Department"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneReferenceRange", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("SexHormoneReferenceRanges") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sex_hor"); + + b.HasOne("Shentun.Peis.Models.SexHormoneTerm", "SexHormoneTerm") + .WithMany("SexHormoneReferenceRanges") + .HasForeignKey("SexHormoneTermId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sex_ho2"); + + b.Navigation("Item"); + + b.Navigation("SexHormoneTerm"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Suggestion", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("Suggestions") + .HasForeignKey("DiagnosisId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_suggestion_diagnosis"); + + b.Navigation("Diagnosis"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumDiagnosis", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("SumDiagnoses") + .HasForeignKey("DiagnosisId") + .IsRequired() + .HasConstraintName("fk_sum_diagnosis_diagnosis"); + + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("SumDiagnoses") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_dia"); + + b.Navigation("Diagnosis"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionContent", b => + { + b.HasOne("Shentun.Peis.Models.SumSuggestionHeader", "SumSuggestionHeader") + .WithMany("SumSuggestionContents") + .HasForeignKey("SumSuggestionHeaderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sug"); + + b.Navigation("SumSuggestionHeader"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionHeader", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("SumSuggestionHeaders") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sug"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryContent", b => + { + b.HasOne("Shentun.Peis.Models.SumSummaryHeader", "SumSummaryHeader") + .WithMany("SumSummaryContents") + .HasForeignKey("SumSummaryHeaderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sum"); + + b.Navigation("SumSummaryHeader"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryHeader", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("SumSummaryHeaders") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sum"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => + { + b.HasOne("Shentun.Peis.Models.SysParmType", "SysParmType") + .WithMany("SysParms") + .HasForeignKey("SysParmTypeId") + .IsRequired() + .HasConstraintName("fk_sys_parm_sys_parm_type"); + + b.Navigation("SysParmType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValue", b => + { + b.HasOne("Shentun.Peis.Models.SysParm", "SysParm") + .WithMany("SysParmValues") + .HasForeignKey("SysParmId") + .IsRequired() + .HasConstraintName("fk_sys_parm_value_sys_parm"); + + b.Navigation("SysParm"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValueOption", b => + { + b.HasOne("Shentun.Peis.Models.SysParm", "SysParm") + .WithMany("SysParmValueOptions") + .HasForeignKey("SysParmId") + .IsRequired() + .HasConstraintName("fk_sys_par"); + + b.Navigation("SysParm"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.User", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("Users") + .HasForeignKey("DepartmentId") + .IsRequired() + .HasConstraintName("fk_user_department"); + + b.Navigation("Department"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserDepartment", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("UserDepartments") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_op"); + + b.HasOne("Shentun.Peis.Models.User", "User") + .WithMany("UserDepartments") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_o2"); + + b.Navigation("Department"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserGrouping", b => + { + b.HasOne("Shentun.Peis.Models.Grouping", "Grouping") + .WithMany("UserGroupings") + .HasForeignKey("GroupingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_grouping_grouping"); + + b.HasOne("Shentun.Peis.Models.User", "User") + .WithMany("UserGroupings") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_grouping_users"); + + b.Navigation("Grouping"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserItemType", b => + { + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("UserItemTypes") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_item_type_item_type"); + + b.HasOne("Shentun.Peis.Models.User", "User") + .WithMany("UserItemTypes") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_item_type_users"); + + b.Navigation("ItemType"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestA", b => + { + b.Navigation("TestBs"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => + { + b.Navigation("AsbitemDetails"); + + b.Navigation("ChargeAsbitems"); + + b.Navigation("CustomerOrgGroupDetails"); + + b.Navigation("MedicalPackageDetails"); + + b.Navigation("RegisterAsbitems"); + + b.Navigation("SampleGroupDetail"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultTemplate", b => + { + b.Navigation("BigtextResultConclusions"); + + b.Navigation("BigtextResultDescriptions"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultType", b => + { + b.Navigation("BigtextResultTemplates"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardRegister", b => + { + b.Navigation("CardBills"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardType", b => + { + b.Navigation("CardRegisters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Charge", b => + { + b.Navigation("ChargeAsbitems"); + + b.Navigation("ChargeBacks"); + + b.Navigation("ChargePays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeAsbitem", b => + { + b.Navigation("ChargePriceItems"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBack", b => + { + b.Navigation("ChargeBackPays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonCharType", b => + { + b.Navigation("CommonChars"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => + { + b.Navigation("ContactMethods"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValueType", b => + { + b.Navigation("CriticalValues"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrg", b => + { + b.Navigation("ContactPeople"); + + b.Navigation("CustomerOrgRegisters"); + + b.Navigation("OrganizationUnitsCustomerOrgs"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgCharge", b => + { + b.Navigation("CustomerOrgChargeBacks"); + + b.Navigation("CustomerOrgChargePay"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBack", b => + { + b.Navigation("CustomerOrgChargeBackPays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroup", b => + { + b.Navigation("CustomerOrgGroupDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgRegister", b => + { + b.Navigation("CustomerOrgCharges"); + + b.Navigation("CustomerOrgGroups"); + + b.Navigation("PatientRegisters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Department", b => + { + b.Navigation("CardRegisters"); + + b.Navigation("OrganizationUnitsCustomerOrgs"); + + b.Navigation("Rooms"); + + b.Navigation("ServiceTrades"); + + b.Navigation("UserDepartments"); + + b.Navigation("Users"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Diagnosis", b => + { + b.Navigation("DiagnosisTemplateDetails"); + + b.Navigation("ItemResultMatches"); + + b.Navigation("Suggestions"); + + b.Navigation("SumDiagnoses"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisLevel", b => + { + b.Navigation("Diagnoses"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplate", b => + { + b.Navigation("DiagnosisTemplateDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Grouping", b => + { + b.Navigation("UserGroupings"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.GuideType", b => + { + b.Navigation("ItemTypes"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.InvoiceItemType", b => + { + b.Navigation("Asbitems"); + + b.Navigation("PriceItems"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Item", b => + { + b.Navigation("AsbitemDetails"); + + b.Navigation("ItemResultMatches"); + + b.Navigation("ItemResultTemplateTypes"); + + b.Navigation("ItemResultTemplates"); + + b.Navigation("ItemTemplateDetails"); + + b.Navigation("ReferenceRanges"); + + b.Navigation("RegisterCheckItems"); + + b.Navigation("SexHormoneReferenceRanges"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplate", b => + { + b.Navigation("ItemTemplateDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemType", b => + { + b.Navigation("Asbitems"); + + b.Navigation("BigtextResultTypes"); + + b.Navigation("Diagnoses"); + + b.Navigation("Items"); + + b.Navigation("Rooms"); + + b.Navigation("UserItemTypes"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MaritalStatus", b => + { + b.Navigation("PatientRegisters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusionType", b => + { + b.Navigation("MedicalConclusions"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackage", b => + { + b.Navigation("MedicalPackageDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalReportType", b => + { + b.Navigation("ItemTypes"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => + { + b.Navigation("Charges"); + + b.Navigation("HealthCertificate"); + + b.Navigation("LisRequests"); + + b.Navigation("PatientOccupationalDisease"); + + b.Navigation("PatientOccupationalHistories"); + + b.Navigation("PatientPoisons"); + + b.Navigation("PatientSymptoms"); + + b.Navigation("PhoneFollows"); + + b.Navigation("QueueRegisters"); + + b.Navigation("RegisterAsbitems"); + + b.Navigation("SumDiagnoses"); + + b.Navigation("SumSuggestionHeaders"); + + b.Navigation("SumSummaryHeaders"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PayMode", b => + { + b.Navigation("CardBills"); + + b.Navigation("ChargeBackPays"); + + b.Navigation("ChargePays"); + + b.Navigation("CustomerOrgChargeBackPays"); + + b.Navigation("CustomerOrgChargePays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Poison", b => + { + b.Navigation("PatientPoisons"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PoisonType", b => + { + b.Navigation("Poisons"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheck", b => + { + b.Navigation("RegisterAsbitems"); + + b.Navigation("RegisterCheckItems"); + + b.Navigation("RegisterCheckPictures"); + + b.Navigation("RegisterCheckSuggestions"); + + b.Navigation("RegisterCheckSummaries"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ResultStatus", b => + { + b.Navigation("RegisterCheckItems"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleContainer", b => + { + b.Navigation("LisRequests"); + + b.Navigation("SampleGroups"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => + { + b.Navigation("SampleGroupDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleType", b => + { + b.Navigation("LisRequests"); + + b.Navigation("SampleGroups"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneTerm", b => + { + b.Navigation("SexHormoneReferenceRanges"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionHeader", b => + { + b.Navigation("SumSuggestionContents"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryHeader", b => + { + b.Navigation("SumSummaryContents"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Symptom", b => + { + b.Navigation("PatientSymptoms"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => + { + b.Navigation("SysParmValueOptions"); + + b.Navigation("SysParmValues"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmType", b => + { + b.Navigation("SysParms"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.User", b => + { + b.Navigation("UserDepartments"); + + b.Navigation("UserGroupings"); + + b.Navigation("UserItemTypes"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230506035600_i2.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230506035600_i2.cs new file mode 100644 index 0000000..6941e76 --- /dev/null +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230506035600_i2.cs @@ -0,0 +1,75 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Shentun.Peis.Migrations +{ + public partial class i2 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "is_valid", + table: "users", + newName: "is_active"); + + migrationBuilder.RenameColumn( + name: "is_valid", + table: "room", + newName: "is_active"); + + migrationBuilder.RenameColumn( + name: "is_valid", + table: "medical_package", + newName: "is_active"); + + migrationBuilder.RenameColumn( + name: "is_valid", + table: "item", + newName: "is_active"); + + migrationBuilder.RenameColumn( + name: "is_valid", + table: "department", + newName: "is_active"); + + migrationBuilder.RenameColumn( + name: "is_valid", + table: "asbitem", + newName: "is_active"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "is_active", + table: "users", + newName: "is_valid"); + + migrationBuilder.RenameColumn( + name: "is_active", + table: "room", + newName: "is_valid"); + + migrationBuilder.RenameColumn( + name: "is_active", + table: "medical_package", + newName: "is_valid"); + + migrationBuilder.RenameColumn( + name: "is_active", + table: "item", + newName: "is_valid"); + + migrationBuilder.RenameColumn( + name: "is_active", + table: "department", + newName: "is_valid"); + + migrationBuilder.RenameColumn( + name: "is_active", + table: "asbitem", + newName: "is_valid"); + } + } +} diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs index 2701d9a..03d789b 100644 --- a/src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs @@ -251,6 +251,11 @@ namespace Shentun.Peis.Migrations .HasColumnName("invoice_item_type_id") .IsFixedLength(); + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + b.Property("IsBeforeEat") .HasMaxLength(1) .HasColumnType("character(1)") @@ -281,11 +286,6 @@ namespace Shentun.Peis.Migrations .HasColumnType("character(1)") .HasColumnName("is_picture_rotate"); - b.Property("IsValid") - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_valid"); - b.Property("ItemTypeId") .HasColumnType("uuid") .HasColumnName("item_type_id") @@ -2048,10 +2048,10 @@ namespace Shentun.Peis.Migrations .HasColumnName("display_order") .HasDefaultValueSql("1"); - b.Property("IsValid") + b.Property("IsActive") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_valid"); + .HasColumnName("is_active"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") @@ -3091,6 +3091,11 @@ namespace Shentun.Peis.Migrations .HasColumnType("character varying(100)") .HasColumnName("input_check"); + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + b.Property("IsCalculationItem") .HasMaxLength(1) .HasColumnType("character(1)") @@ -3116,11 +3121,6 @@ namespace Shentun.Peis.Migrations .HasColumnType("character(1)") .HasColumnName("is_produce_summary"); - b.Property("IsValid") - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_valid"); - b.Property("ItemTypeId") .HasColumnType("uuid") .HasColumnName("item_type_id") @@ -3823,10 +3823,10 @@ namespace Shentun.Peis.Migrations .HasDefaultValueSql("'A'::bpchar") .HasComment("适用性别"); - b.Property("IsValid") + b.Property("IsActive") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_valid") + .HasColumnName("is_active") .HasComment("启用标志"); b.Property("LastModificationTime") @@ -5910,10 +5910,10 @@ namespace Shentun.Peis.Migrations .HasColumnName("for_sex_id") .HasDefaultValueSql("'A'::bpchar"); - b.Property("IsValid") + b.Property("IsActive") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_valid"); + .HasColumnName("is_active"); b.Property("ItemTypeId") .HasColumnType("uuid") @@ -7236,10 +7236,10 @@ namespace Shentun.Peis.Migrations .HasColumnType("character varying(50)") .HasColumnName("email"); - b.Property("IsValid") + b.Property("IsActive") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_valid"); + .HasColumnName("is_active"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone")