diff --git a/src/Shentun.Peis.Domain/Models/Report.cs b/src/Shentun.Peis.Domain/Models/Report.cs index 8ddb967..bce8f35 100644 --- a/src/Shentun.Peis.Domain/Models/Report.cs +++ b/src/Shentun.Peis.Domain/Models/Report.cs @@ -31,7 +31,7 @@ namespace Shentun.Peis.Models [StringLength(64)] public string DisplayName { get; set; } = null!; - [Column("isActive")] + [Column("is_active")] [Comment("启用标志(N:禁用,Y:启用)")] [Required] [MaxLength(1)] diff --git a/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs b/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs index 02f2796..956d2c0 100644 --- a/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs +++ b/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs @@ -358,6 +358,10 @@ public class PeisDbContext : #endregion + builder.Entity(entity => { + entity.Property(t => t.Name).HasColumnName("name"); + }); + #region new整理 builder.ApplyConfiguration(new AsbitemDbMapping()); diff --git a/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisEntityTypeBuilder.cs b/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisEntityTypeBuilder.cs index 75345d4..c2271e4 100644 --- a/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisEntityTypeBuilder.cs +++ b/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisEntityTypeBuilder.cs @@ -39,15 +39,16 @@ namespace Shentun.Peis.EntityFrameworkCore public static void TryConfigureId(this EntityTypeBuilder b) { - - var props = b.Metadata.ClrType.GetProperties(); - foreach (var prop in props) - { - if (prop.Name == "Id") + + var props = b.Metadata.ClrType.GetProperties(); + foreach (var prop in props) { - b.Property("Id").HasColumnName("id"); + if (prop.Name == "Id") + { + b.Property("Id").HasColumnName("id"); + } } - } + } diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230825105019_i08251.Designer.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230825105019_i08251.Designer.cs new file mode 100644 index 0000000..154d9c6 --- /dev/null +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230825105019_i08251.Designer.cs @@ -0,0 +1,11680 @@ +// +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("20230825105019_i08251")] + partial class i08251 + { + 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.HelloA", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ADesc") + .HasColumnType("text") + .HasColumnName("a_desc"); + + b.Property("AName") + .ValueGeneratedOnAdd() + .HasColumnType("text") + .HasDefaultValue("默认值") + .HasColumnName("a_name"); + + b.Property("AddTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("add_time") + .HasDefaultValueSql("now()"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("HelloTypeId") + .HasColumnType("text") + .HasColumnName("hello_type_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.ToTable("hello_a"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("TypeName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("type_name") + .HasComment("类型名称"); + + b.Property("s1") + .HasColumnType("uuid") + .HasColumnName("s1"); + + b.Property("s2") + .HasColumnType("uuid") + .HasColumnName("s2"); + + b.Property("s3") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("s3"); + + b.HasKey("Id"); + + b.ToTable("hello_type"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.Ma", b => + { + b.Property("Id") + .HasColumnType("text") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.HasKey("Id"); + + b.ToTable("ma"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.Mb", b => + { + b.Property("Id") + .HasColumnType("text") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MaId") + .HasColumnType("text") + .HasColumnName("ma_id"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.HasKey("Id"); + + b.HasIndex("MaId"); + + b.ToTable("mb"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.Mc", b => + { + b.Property("Id") + .HasColumnType("text") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MbId") + .HasColumnType("text") + .HasColumnName("mb_id"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.HasKey("Id"); + + b.HasIndex("MbId"); + + b.ToTable("mc"); + }); + + 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.Books.TestCT", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("TName") + .HasColumnType("text") + .HasColumnName("t_name"); + + b.HasKey("Id"); + + b.ToTable("test_ct"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AbpUserDepartment", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("UserId", "OrganizationUnitId") + .HasName("pk_user_organizationunitid"); + + b.ToTable("abp_user_department"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("编号"); + + b.Property("ClinicalMeaning") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("clinical_meaning") + .HasComment("临床意义"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DefaultResult") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("default_result") + .HasComment("默认结果"); + + b.Property("DeviceTypeId") + .HasColumnType("uuid") + .HasColumnName("device_type_id") + .IsFixedLength() + .HasComment("仪器类别"); + + b.Property("DiagnosisFunction") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("diagnosis_function") + .HasComment("诊断函数"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别,M-男,F-女,A-全部"); + + b.Property("InvoiceItemTypeId") + .HasColumnType("uuid") + .HasColumnName("invoice_item_type_id") + .IsFixedLength() + .HasComment("发票类别"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasComment("是启用"); + + b.Property("IsBeforeEat") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_before_eat") + .HasComment("餐前项目"); + + b.Property("IsCheck") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_check") + .HasComment("是检查项目"); + + b.Property("IsContinueProcess") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_continue_process") + .HasComment("诊断函数处理完毕后继续处理"); + + b.Property("IsDiagnosisFunction") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_diagnosis_function") + .HasComment("启用诊断函数"); + + b.Property("IsItemResultMerger") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_item_result_merger") + .HasComment("项目结果合并"); + + b.Property("IsPictureRotate") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_picture_rotate") + .HasComment("体检报告图片旋转90°"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Price") + .HasPrecision(8, 2) + .HasColumnType("numeric(8,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("QueueTime") + .HasPrecision(3, 1) + .HasColumnType("numeric(3,1)") + .HasColumnName("queue_time") + .HasComment("候诊时间"); + + b.Property("ShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("short_name") + .HasComment("简称"); + + 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() + .HasComment("项目编码"); + + 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() + .HasComment("单位科室ID"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目ID"); + + b.Property("ForSexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasComment("适用性别ID"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Guide") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("guide") + .HasComment("指引单内容"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount") + .HasComment("数量"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PriceItemId") + .HasColumnType("uuid") + .HasColumnName("price_item_id") + .IsFixedLength() + .HasComment("价表项目编码"); + + b.HasKey("Id"); + + b.ToTable("asbitem_price_item"); + + b.HasComment("组和项目包含价表项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultConclusion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("BigtextResultTemplateId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_template_id") + .IsFixedLength(); + + b.Property("Conclusion") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("conclusion") + .HasComment("结论"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("BigtextResultTemplateId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_template_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("description") + .HasComment("描述"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("BigtextResultTypeId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_type_id") + .IsFixedLength() + .HasComment("结果类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength() + .HasComment("父编号"); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CountryCode") + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("country_code") + .HasComment("国家标准码"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MobileTelephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("mobile_telephone") + .HasComment("手机"); + + 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(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") + .HasColumnName("id") + .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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .HasComment("收据号"); + + b.Property("ChargeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("charge_flag") + .HasDefaultValueSql("0"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id"); + + 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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .HasComment("退费编号"); + + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id") + .HasComment("结账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() + .HasComment("支付方式ID"); + + b.Property("BackMoeny") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("back_moeny") + .HasComment("退费金额"); + + b.Property("CardBillId") + .HasColumnType("uuid") + .HasColumnName("card_bill_id") + .HasComment("会员卡ID"); + + 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") + .HasComment("会员卡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") + .HasColumnName("id"); + + 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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CommonCharTypeId") + .HasColumnType("uuid") + .HasColumnName("common_char_type_id") + .IsFixedLength() + .HasComment("常用字符类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(1) + .HasColumnType("character varying(1)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ContactMethodType") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("contact_method_type") + .HasDefaultValueSql("'M'::bpchar") + .HasComment("联系方式类别-比如0-手机、1-电子邮箱"); + + b.Property("ContactMethodValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("contact_method_value") + .HasComment("联系方式,比如18911254911,839860190@qq.com"); + + b.Property("ContactPersonId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.HasIndex("ContactPersonId"); + + b.ToTable("contact_method"); + + b.HasComment("联系方式新增量主键,更新映射关系"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("客户单位编号"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("姓名"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("Title") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("title") + .HasComment("职务"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CriticalValueTypeId") + .HasColumnType("uuid") + .HasColumnName("critical_value_type_id") + .IsFixedLength() + .HasComment("危急值类别编号"); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength() + .HasComment("父编号"); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + 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") + .HasColumnName("id") + .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("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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") + .HasComment("开票名称"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasDefaultValueSql("0") + .HasComment("状态"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock") + .HasComment("锁住"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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() + .HasComment("父编号"); + + b.Property("PathCode") + .HasMaxLength(60) + .HasColumnType("character varying(60)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + 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") + .HasComment("简称"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + 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") + .HasColumnName("id"); + + b.Property("ChargeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("charge_flag") + .HasComment("收退费标志"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id") + .HasComment("客户单位登记ID"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Payer") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("payer") + .HasComment("付款人"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id") + .HasComment("结算账户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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CustomerOrgChargeId") + .HasColumnType("uuid") + .HasColumnName("customer_org_charge_id") + .HasComment("收费编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id") + .HasComment("结算账户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() + .HasComment("支付方式"); + + b.Property("BackMoeny") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("back_moeny") + .HasComment("退费金额"); + + 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") + .HasColumnName("id"); + + b.Property("ChargeMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_money") + .HasComment("支付金额"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength() + .HasComment("支付方式"); + + 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") + .HasColumnName("id") + .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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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() + .HasComment("分组编号"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + 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") + .HasColumnName("id"); + + 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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MedicalTimes") + .HasColumnType("smallint") + .HasColumnName("medical_times") + .HasComment("单位体检次数"); + + b.Property("RegisterName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("register_name") + .HasComment("计划名称"); + + b.Property("RegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("register_no") + .HasComment("计划号"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CodePrefix") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("code_prefix"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("仪器类别编号"); + + b.Property("CheckTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("check_type_flag"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_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("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DiagnosisLevelId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_level_id") + .HasComment("诊断级别"); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别"); + + b.Property("IsIll") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_ill") + .HasComment("是疾病"); + + b.Property("IsSummaryTemplate") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_summary_template") + .HasComment("是总检模板"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("simple_code"); + + b.Property("SuggestionName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_name") + .HasComment("建议名称"); + + 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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.ToTable("diagnosis_level"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisPostfix", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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() + .HasComment("诊断模板编号"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断编号"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength() + .HasComment("父编号"); + + b.Property("PathCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + b.HasKey("Id"); + + b.ToTable("diagnosis_type"); + + b.HasComment("诊断类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpMode", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("follow_up_mode"); + + b.HasComment("随访方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpPlan", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content") + .HasComment("随访内容"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CycleDays") + .HasColumnType("smallint") + .HasColumnName("cycle_days") + .HasComment("周期天数"); + + b.Property("DoctorUserId") + .HasColumnType("uuid") + .HasColumnName("doctor_user_id") + .HasComment("医生"); + + b.Property("FollowUpModeId") + .HasColumnType("uuid") + .HasColumnName("follow_up_mode_id") + .IsFixedLength() + .HasComment("随访方式"); + + b.Property("FollowUpTypeId") + .HasColumnType("uuid") + .HasColumnName("follow_up_type_id") + .IsFixedLength() + .HasComment("随访类别"); + + b.Property("IsLoop") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_loop") + .HasComment("是否循环"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PerfomFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("perfom_flag") + .HasComment("执行标志"); + + b.Property("PerfomTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("perfom_time") + .HasComment("执行时间"); + + b.Property("PerfomUserId") + .HasColumnType("uuid") + .HasColumnName("perfom_user_id") + .HasComment("执行者用户ID"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("Id"); + + b.ToTable("follow_up_plan"); + + b.HasComment("随访计划"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("follow_up_type"); + + b.HasComment("随访类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ForSex", b => + { + b.Property("Id") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("for_sex"); + + b.HasComment("适用性别设置,固定编码"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Grouping", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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"); + + b.HasComment("废弃"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.GuideType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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("CheckRequestNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("check_request_no"); + + 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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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("CheckRequestNo"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CalculationFunction") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("calculation_function") + .HasComment("计算函数"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DefaultResult") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("default_result") + .HasComment("默认结果"); + + b.Property("DiagnosisFunction") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("diagnosis_function") + .HasComment("诊断函数"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("EnglishShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("english_short_name") + .HasComment("英文缩写"); + + b.Property("InputCheck") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("input_check") + .HasComment("输入结果校验公式"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasComment("启用"); + + b.Property("IsCalculationItem") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_calculation_item") + .HasComment("是计算项目"); + + b.Property("IsContinueProcess") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_continue_process") + .HasComment("是继续处理"); + + b.Property("IsDiagnosisFunction") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_diagnosis_function") + .HasComment("启用诊断函数"); + + b.Property("IsNameIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_into_summary") + .HasComment("名称进入小结"); + + b.Property("IsProduceSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_produce_summary") + .HasComment("是生成小结"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("PriceItemId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("price_item_id") + .IsFixedLength() + .HasComment("价表项目编码"); + + b.Property("ReferenceRangeTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("reference_range_type_flag") + .HasDefaultValueSql("'E'::bpchar") + .HasComment("参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素"); + + b.Property("ResultTemplateTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("result_template_type_flag") + .HasDefaultValueSql("0") + .HasComment("结果模板类别标志"); + + b.Property("SimpleCode") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("simple_code"); + + b.Property("UnitId") + .HasColumnType("uuid") + .HasColumnName("unit_id") + .IsFixedLength() + .HasComment("单位"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("结果匹配编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("结果模板编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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() + .HasComment("项目编号"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CheckTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("check_type_flag") + .HasDefaultValueSql("'G'::bpchar") + .HasComment("检查类别,0-普通检查,1-检验,2-影像检查"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("GuidTypeId") + .HasColumnType("uuid") + .HasColumnName("guid_type_id") + .IsFixedLength() + .HasComment("指引类别"); + + b.Property("IsMergeAsbitem") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_merge_asbitem") + .HasComment("合并组合项目,Y-是,N-否"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MedicalReportTypeId") + .HasColumnType("uuid") + .HasColumnName("medical_report_type_id") + .IsFixedLength() + .HasComment("体检报告类别"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength() + .HasComment("父id"); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + 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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print") + .HasComment("是否已打印"); + + b.Property("IsSignIn") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_sign_in") + .HasComment("是签收"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("LisRequestNo") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("lis_request_no") + .HasComment("检验申请单号"); + + b.Property("SampleGroupId") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("条码分组ID"); + + b.Property("Sampler") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("sampler") + .HasComment("采样人姓名"); + + b.Property("SamplingTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("sampling_time") + .HasComment("采样时间"); + + b.Property("SignInOrder") + .HasColumnType("integer") + .HasColumnName("sign_in_order") + .HasComment("签收顺序"); + + b.Property("SignInPerson") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("sign_in_person") + .HasComment("签收人姓名"); + + b.Property("SignInTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("sign_in_time") + .HasComment("签收时间"); + + b.HasKey("Id"); + + b.HasIndex("SampleGroupId"); + + b.HasIndex(new[] { "LisRequestNo" }, "ix_lis_request") + .IsUnique(); + + b.ToTable("lis_request"); + + b.HasComment("检验申请单"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MaritalStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("婚姻状况编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name") + .HasComment("婚姻状况名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("体检结论编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_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("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MedicalConclusionTypeId") + .HasMaxLength(2) + .HasColumnType("character(2)") + .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") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("套餐主档编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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() + .HasComment("组合项目编号"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("体检类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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("NationId") + .HasMaxLength(3) + .HasColumnType("character(3)") + .HasColumnName("nation_id") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CountryCode") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("country_code"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_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("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.HasKey("NationId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_nation") + .IsUnique(); + + b.ToTable("nation"); + + b.HasComment("民族设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OcCheckType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("职业病检查类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id"); + + b.Property("ComputerName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("computer_name"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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() + .HasComment("客户单位编号"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength() + .HasComment("体检中心编号"); + + 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") + .HasColumnName("id"); + + b.Property("Address") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("address") + .HasComment("地址"); + + b.Property("BirthDate") + .HasColumnType("date") + .HasColumnName("birth_date") + .HasComment("出生日期"); + + b.Property("BirthPlaceId") + .HasColumnType("uuid") + .HasColumnName("birth_place_id") + .IsFixedLength() + .HasComment("出生地"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name") + .HasComment("姓名"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("email") + .HasComment("email"); + + b.Property("IdNo") + .HasMaxLength(18) + .HasColumnType("character varying(18)") + .HasColumnName("id_no") + .HasComment("身份证号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MaritalStatusId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasComment("婚姻状况"); + + b.Property("MobileTelephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("mobile_telephone") + .HasComment("手机号"); + + b.Property("NationId") + .HasColumnType("text") + .HasColumnName("nation_id") + .IsFixedLength() + .HasComment("民族编号"); + + b.Property("PatientNo") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("patient_no") + .HasComment("档案号"); + + b.Property("PatientPassword") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("patient_password") + .HasComment("登录密码"); + + b.Property("PostalCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("postal_code") + .HasComment("邮政编码"); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id") + .HasComment("性别"); + + b.Property("Telephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("telephone") + .HasComment("电话"); + + b.HasKey("Id"); + + b.HasIndex("PatientNo") + .IsUnique(); + + 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") + .HasColumnName("id"); + + 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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id"); + + b.Property("BeginDate") + .HasColumnType("date") + .HasColumnName("begin_date"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("EndDate") + .HasColumnType("date") + .HasColumnName("end_date"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .HasComment("登记流水号"); + + b.Property("Age") + .HasColumnType("smallint") + .HasColumnName("age") + .HasComment("年龄"); + + b.Property("AuditDate") + .HasColumnType("date") + .HasColumnName("audit_date") + .HasComment("审核日期"); + + b.Property("AuditDoctor") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("audit_doctor") + .HasComment("审核医生"); + + b.Property("BirthDate") + .HasColumnType("date") + .HasColumnName("birth_date") + .HasComment("出生日期"); + + 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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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") + .HasComment("客户单位登记ID"); + + b.Property("GuidePrintTimes") + .HasColumnType("smallint") + .HasColumnName("guide_print_times") + .HasComment("指引单打印次数"); + + b.Property("InterposeMeasure") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("interpose_measure") + .HasComment("干预措施"); + + b.Property("IsAudit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_audit") + .HasComment("审核"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock") + .HasComment("锁住"); + + 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") + .HasComment("隐藏姓名"); + + b.Property("IsPhoneFollow") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_phone_follow") + .HasComment("电话随访"); + + b.Property("IsRecoverGuide") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_recover_guide") + .HasComment("指引单收回"); + + b.Property("IsUpload") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_upload") + .HasComment("是否上传到WEB"); + + b.Property("IsVip") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_vip") + .HasComment("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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasComment("体检卡号"); + + 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") + .HasComment("体检中心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(30) + .HasColumnType("character varying(30)") + .HasColumnName("patient_register_no") + .HasComment("条码号"); + + b.Property("PersonnelTypeId") + .HasColumnType("uuid") + .HasColumnName("personnel_type_id") + .IsFixedLength() + .HasComment("人员类别"); + + b.Property("Photo") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("photo") + .HasComment("照片"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + 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") + .HasComment("性激素期限"); + + 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(50) + .HasColumnType("character varying(50)") + .HasColumnName("summary_doctor") + .HasComment("总检医生"); + + b.Property("ThirdInfo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("third_info") + .HasComment("附加第三方信息"); + + b.HasKey("Id"); + + b.HasIndex("MaritalStatusId"); + + 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"); + + b.HasComment("职业病-体检病人症状"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PayMode", b => + { + b.Property("Id") + .HasMaxLength(4) + .HasColumnType("character varying(4)") + .HasColumnName("id") + .HasComment("编号,固定编码"); + + 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("Id"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("人员类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("FollowContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("follow_content") + .HasComment("随访内容"); + + b.Property("FollowUpPlanId") + .HasColumnType("uuid") + .HasColumnName("follow_up_plan_id") + .HasComment("随访计划ID"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("ReplyContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("reply_content") + .HasComment("回复内容"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("phone_follow"); + + b.HasComment("电话随访"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Poison", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("毒害编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_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("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("毒害类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_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("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("职务编号"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time") + .HasComment("最后修改日期"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id") + .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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("InvoiceItemTypeId") + .HasColumnType("uuid") + .HasColumnName("invoice_item_type_id") + .IsFixedLength() + .HasComment("发票项目类别ID"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("PriceItemCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("price_item_code") + .HasComment("价表编码"); + + 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("PrimarykeyBuilderId") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("primarykey_builder_id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DateString") + .HasMaxLength(8) + .HasColumnType("character(8)") + .HasColumnName("date_string") + .IsFixedLength() + .HasComment("日期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SerialNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("serial_no") + .HasComment("序列号"); + + b.HasKey("PrimarykeyBuilderId"); + + b.ToTable("primarykey_builder"); + + b.HasComment("主键产生器"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.QueueRegister", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("CallTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("call_time") + .HasComment("叫号时间"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("0") + .HasComment("完成标志"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("排队顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("NoCompleteReason") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_complete_reason") + .HasDefaultValueSql("0") + .HasComment("未完成原因"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("RoomId") + .HasColumnType("uuid") + .HasColumnName("room_id") + .IsFixedLength() + .HasComment("房间ID"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("queue_register"); + + b.HasComment("排队登记"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReferenceRange", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("LowerDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("lower_diagnosis_id") + .IsFixedLength() + .HasComment("偏低诊断"); + + b.Property("ReferenceRangeTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("reference_range_type_flag") + .HasComment("参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素"); + + 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("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .HasComment("主键"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount") + .HasComment("数量"); + + b.Property("AsbitemId") + .HasMaxLength(6) + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price") + .HasComment("实收价格"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("GroupPackageId") + .HasColumnType("uuid") + .HasColumnName("group_package_id"); + + b.Property("IsCharge") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_charge") + .HasComment("是否已收费"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("LisRequestId") + .HasColumnType("uuid") + .HasColumnName("lis_request_id") + .HasComment("LIS申请ID"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("登记流水号"); + + b.Property("PayTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(4) + .HasColumnType("character varying(4)") + .HasColumnName("pay_type_flag") + .HasDefaultValueSql("0") + .HasComment("支付方式,比如是自费、免费、单位支付"); + + b.Property("StandardPrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("standard_price") + .HasComment("标准价格"); + + b.HasKey("Id"); + + 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") + .HasColumnName("id"); + + b.Property("AuditTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("audit_time") + .HasComment("审核时间"); + + b.Property("AuditorUserId") + .HasColumnType("uuid") + .HasColumnName("auditor_user_id") + .HasComment("审核医生ID"); + + b.Property("CheckDate") + .HasColumnType("date") + .HasColumnName("check_date") + .HasComment("检查日期"); + + b.Property("CheckDoctorId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("check_doctor_id") + .HasComment("检查医生ID"); + + b.Property("CheckRequestNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("check_request_no") + .HasComment("检查单号"); + + b.Property("CheckRequestPrintTimes") + .HasColumnType("smallint") + .HasColumnName("check_request_print_times") + .HasComment("检查申请单打印次数"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("0") + .HasComment("完成标志"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value") + .HasComment("危急值"); + + b.Property("CriticalValueCreateDate") + .HasColumnType("date") + .HasColumnName("critical_value_create_date") + .HasComment("危急值创建日期"); + + b.Property("CriticalValueFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("critical_value_flag") + .HasDefaultValueSql("0") + .HasComment("危急值标志"); + + b.Property("CriticalValueProcessContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value_process_content") + .HasComment("危急值处理内容"); + + b.Property("CriticalValueProcessDate") + .HasColumnType("date") + .HasColumnName("critical_value_process_date") + .HasComment("危急值处理日期"); + + b.Property("CriticalValueProcessDoctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("critical_value_process_doctor") + .HasComment("危急值处理医生"); + + b.Property("CriticalValueProcessFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("critical_value_process_flag") + .HasComment("危急值处理标志"); + + b.Property("IsAudit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_audit") + .HasComment("是审核"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock") + .HasComment("是否锁住"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("RegisterAsbitemId") + .HasColumnType("uuid") + .HasColumnName("register_asbitem_id"); + + b.Property("ThirdInfo") + .HasMaxLength(80) + .HasColumnType("character varying(80)") + .HasColumnName("third_info") + .HasComment("第三方信息"); + + b.HasKey("Id"); + + b.HasIndex("RegisterAsbitemId"); + + 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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value") + .HasComment("危急值"); + + b.Property("Doctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("doctor") + .HasComment("处理医生"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasComment("是否完成"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ProcessTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("process_type_flag") + .HasComment("处理类别标志"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记检查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(50) + .HasColumnType("character varying(50)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value") + .HasComment("危急值范围"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value") + .HasComment("危急值"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasComment("单位"); + + 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") + .HasColumnName("id") + .HasComment("检查图片编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记检查ID"); + + b.Property("Suggestion") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion") + .HasComment("建议"); + + 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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记检查ID"); + + b.Property("Summary") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("summary") + .HasComment("综述"); + + b.Property("SummaryFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("summary_flag") + .HasComment("综述标志"); + + b.HasKey("Id"); + + b.HasIndex("RegisterCheckId"); + + b.ToTable("register_check_summary"); + + b.HasComment("登记检查综述"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Report", b => + { + b.Property("Id") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("id") + .HasComment("主键Id"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("display_name") + .HasComment("报表名称"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasDefaultValue('N') + .HasColumnName("isActive") + .HasComment("启用标志(N:禁用,Y:启用)"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.ToTable("report"); + + b.HasComment("自定义报表主表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReportFormat", b => + { + b.Property("Id") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("id") + .HasComment("主键Id"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("display_name") + .HasComment("格式名称"); + + b.Property("IsDefault") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasDefaultValue('N') + .HasColumnName("isDefault") + .HasComment("默认标志(N:不默认,Y:默认)"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ReportId") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("report_id") + .HasComment("报表ID"); + + b.HasKey("Id"); + + b.HasIndex("ReportId"); + + b.ToTable("report_format"); + + b.HasComment("自定义报表格式表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReportFormatTemplate", b => + { + b.Property("Id") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("id") + .HasComment("主键Id"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DataSetJson") + .HasColumnType("text") + .HasColumnName("data_set_json") + .HasComment("模板文件"); + + b.Property("DisplayName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("display_name") + .HasComment("模板名称"); + + b.Property("IsDefault") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasDefaultValue('N') + .HasColumnName("isDefault") + .HasComment("是否默认(N:不默认,Y:默认)"); + + b.Property("IsSystem") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasDefaultValue('N') + .HasColumnName("isSystem") + .HasComment("是否系统自定义(N:停用,Y:启用)"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ReportFormatId") + .HasColumnType("character varying(16)") + .HasColumnName("report_format_id") + .HasComment("报表格式ID"); + + b.Property("TemplateFile") + .HasColumnType("text") + .HasColumnName("template_file") + .HasComment("模板文件"); + + b.Property("TemplateFileType") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("template_file_type") + .HasDefaultValueSql("1") + .HasComment("模板文件类型(0:FastReport,1:Grid++Report)"); + + b.HasKey("Id"); + + b.HasIndex("ReportFormatId"); + + b.ToTable("report_format_template"); + + b.HasComment("自定义报表格式模板表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReportPrinter", b => + { + b.Property("Id") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("id") + .HasComment("主键Id"); + + b.Property("ComputerName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("pc_name") + .HasComment("计算机名称"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PrinterName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("printer_name") + .HasComment("打印机名称"); + + b.Property("ReportId") + .HasColumnType("character varying(16)") + .HasColumnName("report_id") + .HasComment("报表ID"); + + b.HasKey("Id"); + + b.HasIndex("ReportId"); + + b.ToTable("report_printer"); + + b.HasComment("自定义报表客户端打印机设置表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ResultStatus", b => + { + b.Property("Id") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DataInputBackgroundColor") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("data_input_background_color") + .HasDefaultValueSql("16777215") + .HasComment("数据录入报告单颜色"); + + b.Property("DataInputFontColor") + .HasColumnType("integer") + .HasColumnName("data_input_font_color") + .HasComment("数据录入字体颜色"); + + b.Property("DataInputPrompt") + .HasMaxLength(8) + .HasColumnType("character varying(8)") + .HasColumnName("data_input_prompt") + .HasComment("数据录入提示"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ReportBackgroundColor") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("report_background_color") + .HasDefaultValueSql("16777215") + .HasComment("报告单背景颜色"); + + b.Property("ReportFontColor") + .HasColumnType("integer") + .HasColumnName("report_font_color") + .HasComment("报告单字体颜色"); + + b.Property("ReportPrompt") + .HasMaxLength(8) + .HasColumnType("character varying(8)") + .HasColumnName("report_prompt") + .HasComment("报告单提示"); + + b.HasKey("Id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength() + .HasComment(""); + + 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() + .HasComment("项目类别编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ContainerColor") + .HasColumnType("integer") + .HasColumnName("container_color") + .HasComment("颜色"); + + b.Property("ContainerColorName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("container_color_name") + .HasComment("颜色名"); + + b.Property("ContainerRemark") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("container_remark"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SampleContainerId") + .HasColumnType("uuid") + .HasColumnName("sample_container_id") + .IsFixedLength() + .HasComment("标本容器ID"); + + b.Property("SampleTypeId") + .HasColumnType("uuid") + .HasColumnName("sample_type_id") + .IsFixedLength() + .HasComment("标本类型ID"); + + 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() + .HasComment("组合项目编号"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id"); + + b.Property("CompletedBy") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("completed_by") + .HasComment("结账人"); + + b.Property("CompletedTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("completed_time") + .HasComment("结账时间"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasComment("是完成"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.ToTable("settle_account"); + + b.HasComment("结账"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Sex", b => + { + b.Property("Id") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sex"); + + b.HasComment("性别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneReferenceRange", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + 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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value") + .HasComment("危急值参考范围"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("LowerDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("lower_diagnosis_id") + .IsFixedLength() + .HasComment("下限诊断"); + + b.Property("ReferenceRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("reference_range_value") + .HasComment("参考范围"); + + b.Property("SexHormoneTermId") + .HasColumnType("uuid") + .HasColumnName("sex_hormone_term_id") + .IsFixedLength() + .HasComment("性激素期限ID"); + + b.Property("UpperDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("upper_diagnosis_id") + .IsFixedLength() + .HasComment("上限诊断"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id"); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content") + .HasComment("短信内容"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("FollowUpPlanId") + .HasColumnType("uuid") + .HasColumnName("follow_up_plan_id") + .HasComment("随访计划ID"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasComment("是完成"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MobileTelephone") + .HasMaxLength(11) + .HasColumnType("character varying(11)") + .HasColumnName("mobile_telephone") + .HasComment("手机号"); + + b.Property("PatientId") + .HasMaxLength(10) + .HasColumnType("uuid") + .HasColumnName("patient_id") + .HasComment("人员ID"); + + b.Property("PatientName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("patient_name") + .HasComment("姓名"); + + b.Property("SmsTypeId") + .HasColumnType("uuid") + .HasColumnName("sms_type_id") + .IsFixedLength() + .HasComment("短信类别ID"); + + b.HasKey("Id"); + + b.ToTable("sms_send"); + + b.HasComment("短信发送"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content") + .HasComment("短信内容"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("SmsTypeId") + .HasColumnType("uuid") + .HasColumnName("sms_type_id") + .IsFixedLength() + .HasComment("短信类别ID"); + + b.HasKey("Id"); + + b.ToTable("sms_template"); + + b.HasComment("短信模板"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sms_type"); + + b.HasComment("短信类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Suggestion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断ID"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SuggestionContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("suggestion_content") + .HasComment("建议内容"); + + 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") + .HasComment("病人登记ID"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断ID"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SumSuggestionHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_suggestion_header_id") + .HasComment("建议头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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("TemplateContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("template_content") + .HasComment("模板内容"); + + 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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SuggestionContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_content") + .HasComment("建议内容"); + + b.Property("SumSuggestionHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_suggestion_header_id") + .HasComment("建议头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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("SuggestionFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("suggestion_flag") + .HasComment("建议标志"); + + b.Property("SuggestionTitle") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_title") + .HasComment("建议标题"); + + 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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SumSummaryHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_summary_header_id") + .HasComment("建议头ID"); + + b.Property("SummaryContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("summary_content") + .HasComment("建议内容"); + + 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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("SummaryFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("summary_flag") + .HasComment("综述标志"); + + b.Property("SummaryTitle") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("summary_title") + .HasComment("综述标题"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("症状编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_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("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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"); + + b.HasComment("不是本软件的表,估计是系统自动生成的"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => + { + b.Property("Id") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name") + .HasComment("参数名"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("SimpleCode") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("simple_code"); + + b.Property("SysParmTypeId") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("sys_parm_type_id") + .HasComment("参数类别ID"); + + b.Property("ValueType") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("value_type") + .HasComment("结果类别"); + + b.HasKey("Id"); + + b.HasIndex("SysParmTypeId"); + + b.ToTable("sys_parm"); + + b.HasComment("系统参数设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmType", b => + { + b.Property("Id") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ParentId") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("parent_id") + .HasComment("父ID"); + + b.Property("SimpleCode") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sys_parm_type"); + + b.HasComment("系统参数类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValue", b => + { + b.Property("SysParmId") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("sys_parm_id") + .HasComment("参数ID"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength() + .HasComment("单位ID"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ParmValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("parm_value") + .HasComment("参数值"); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("remark") + .HasComment("备注"); + + 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") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("sys_parm_id"); + + b.Property("ValueOption") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("value_option") + .HasComment("可选项"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("ValueOptionName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("value_option_name") + .HasComment("可选项名"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("职称类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_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("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id"); + + b.Property("Address") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("address"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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"); + + b.HasComment("用户表,废弃"); + }); + + 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"); + + b.HasComment("用户组权限-废弃"); + }); + + 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() + .HasComment("项目类别ID"); + + 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"); + + b.HasComment("用户控件权限-废弃"); + }); + + 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") + .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("IsPeis") + .HasMaxLength(1) + .HasColumnType("character varying(1)"); + + 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.Mb", b => + { + b.HasOne("Shentun.Peis.Books.Ma", "Ma") + .WithMany("Mbs") + .HasForeignKey("MaId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_mb_ma_1"); + + b.Navigation("Ma"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.Mc", b => + { + b.HasOne("Shentun.Peis.Books.Mb", "Mb") + .WithMany("Mcs") + .HasForeignKey("MbId") + .HasConstraintName("fk_mc_mb_1"); + + b.Navigation("Mb"); + }); + + 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.Navigation("CardType"); + }); + + 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.SampleGroup", "SampleGroup") + .WithMany("LisRequests") + .HasForeignKey("SampleGroupId") + .IsRequired() + .HasConstraintName("fk_lis_request_sample_group"); + + b.Navigation("SampleGroup"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusion", b => + { + b.HasOne("Shentun.Peis.Models.MedicalConclusionType", "MedicalConclusionType") + .WithMany("MedicalConclusions") + .HasForeignKey("MedicalConclusionTypeId") + .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.MaritalStatus", "MaritalStatus") + .WithMany("PatientRegisters") + .HasForeignKey("MaritalStatusId") + .HasConstraintName("fk_patient_register_marital_status_id"); + + b.HasOne("Shentun.Peis.Models.Patient", "Patient") + .WithMany("PatientRegisters") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient_register_patient"); + + b.Navigation("MaritalStatus"); + + b.Navigation("Patient"); + }); + + 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") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_register_reference_patient_"); + + b.Navigation("Asbitem"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheck", b => + { + b.HasOne("Shentun.Peis.Models.RegisterAsbitem", "RegisterAsbitem") + .WithMany("RegisterChecks") + .HasForeignKey("RegisterAsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registercheck_registerasbitem"); + + b.Navigation("RegisterAsbitem"); + }); + + 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.ReportFormat", b => + { + b.HasOne("Shentun.Peis.Models.Report", "Report") + .WithMany("ReportFormats") + .HasForeignKey("ReportId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_reportformat_report_1"); + + b.Navigation("Report"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReportFormatTemplate", b => + { + b.HasOne("Shentun.Peis.Models.ReportFormat", "ReportFormat") + .WithMany("ReportFormatTemplates") + .HasForeignKey("ReportFormatId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_reportformattemplate_reportprinter_1"); + + b.Navigation("ReportFormat"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReportPrinter", b => + { + b.HasOne("Shentun.Peis.Models.Report", "Report") + .WithMany("ReportPrinters") + .HasForeignKey("ReportId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_reportprinter_report_1"); + + b.Navigation("Report"); + }); + + 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") + .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.Ma", b => + { + b.Navigation("Mbs"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.Mb", b => + { + b.Navigation("Mcs"); + }); + + 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"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Department", b => + { + 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.Patient", b => + { + b.Navigation("PatientRegisters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => + { + b.Navigation("Charges"); + + b.Navigation("HealthCertificate"); + + 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.RegisterAsbitem", b => + { + b.Navigation("RegisterChecks"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheck", b => + { + b.Navigation("RegisterCheckItems"); + + b.Navigation("RegisterCheckPictures"); + + b.Navigation("RegisterCheckSuggestions"); + + b.Navigation("RegisterCheckSummaries"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Report", b => + { + b.Navigation("ReportFormats"); + + b.Navigation("ReportPrinters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReportFormat", b => + { + b.Navigation("ReportFormatTemplates"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ResultStatus", b => + { + b.Navigation("RegisterCheckItems"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleContainer", b => + { + b.Navigation("SampleGroups"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => + { + b.Navigation("LisRequests"); + + b.Navigation("SampleGroupDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleType", b => + { + 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/20230825105019_i08251.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230825105019_i08251.cs new file mode 100644 index 0000000..0bc9f2a --- /dev/null +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230825105019_i08251.cs @@ -0,0 +1,5804 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Shentun.Peis.Migrations +{ + public partial class i08251 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "Id", + table: "users", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "users", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "users", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "users", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "users", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "unit", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "unit", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "unit", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "unit", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "unit", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "title_type", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "title_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "title_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "title_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "title_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "sysdiagrams", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "sysdiagrams", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "sysdiagrams", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "sysdiagrams", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "sysdiagrams", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "sys_parm_value", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "sys_parm_value", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "sys_parm_value", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "sys_parm_value", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "sys_parm_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "sys_parm_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "sys_parm_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "sys_parm_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "sys_parm", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "sys_parm", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "sys_parm", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "sys_parm", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "symptom", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "symptom", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "symptom", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "symptom", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "symptom", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "summary_template", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "summary_template", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "summary_template", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "summary_template", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "summary_template", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "sum_summary_header", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "sum_summary_header", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "sum_summary_header", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "sum_summary_header", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "sum_summary_header", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "sum_summary_content", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "sum_summary_content", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "sum_summary_content", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "sum_summary_content", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "sum_summary_content", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "sum_suggestion_header", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "sum_suggestion_header", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "sum_suggestion_header", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "sum_suggestion_header", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "sum_suggestion_header", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "sum_suggestion_content", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "sum_suggestion_content", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "sum_suggestion_content", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "sum_suggestion_content", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "sum_suggestion_content", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "suggestion", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "suggestion", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "suggestion", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "suggestion", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "suggestion", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "sms_type", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "sms_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "sms_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "sms_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "sms_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "sms_template", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "sms_template", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "sms_template", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "sms_template", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "sms_template", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "sms_send", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "sms_send", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "sms_send", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "sms_send", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "sms_send", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "sex_hormone_term", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "sex_hormone_term", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "sex_hormone_term", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "sex_hormone_term", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "sex_hormone_reference_range", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "sex_hormone_reference_range", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "sex_hormone_reference_range", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "sex_hormone_reference_range", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "sex_hormone_reference_range", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "sex", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "sex", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "sex", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "sex", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "settle_account", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "settle_account", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "settle_account", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "settle_account", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "settle_account", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "service_trades", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "service_trades", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "service_trades", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "service_trades", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "service_trades", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "sample_type", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "sample_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "sample_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "sample_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "sample_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "sample_group", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "sample_group", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "sample_group", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "sample_group", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "sample_group", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "sample_container", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "sample_container", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "sample_container", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "sample_container", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "sample_container", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "room", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "room", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "room", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "room", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "room", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "result_status", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "result_status", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "result_status", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "result_status", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "report_printer", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "report_printer", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "report_printer", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "report_printer", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "report_printer", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "report_format_template", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "report_format_template", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "report_format_template", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "report_format_template", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "report_format_template", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "report_format", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "report_format", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "report_format", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "report_format", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "report_format", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "report", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "report", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "report", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "report", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "report", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "register_check_summary", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "register_check_summary", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "register_check_summary", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "register_check_summary", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "register_check_summary", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "register_check_suggestion", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "register_check_suggestion", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "register_check_suggestion", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "register_check_suggestion", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "register_check_suggestion", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "register_check_picture", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "register_check_picture", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "register_check_picture", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "register_check_picture", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "register_check_picture", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "register_check_item", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "register_check_item", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "register_check_item", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "register_check_item", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "register_check_critical_value", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "register_check_critical_value", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "register_check_critical_value", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "register_check_critical_value", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "register_check_critical_value", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "register_check", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "register_check", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "register_check", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "register_check", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "register_check", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "register_asbitem", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "register_asbitem", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "register_asbitem", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "register_asbitem", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "register_asbitem", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "reference_range", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "reference_range", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "reference_range", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "reference_range", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "reference_range", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "queue_register", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "queue_register", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "queue_register", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "queue_register", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "queue_register", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "primarykey_builder", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "primarykey_builder", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "primarykey_builder", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "primarykey_builder", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "price_item", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "price_item", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "price_item", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "price_item", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "price_item", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "position_type", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "position_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "position_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "position_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "position_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "poison_type", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "poison_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "poison_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "poison_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "poison_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "poison", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "poison", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "poison", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "poison", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "poison", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "phone_follow", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "phone_follow", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "phone_follow", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "phone_follow", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "phone_follow", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "personnel_type", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "personnel_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "personnel_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "personnel_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "personnel_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "patient_register", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "patient_register", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "patient_register", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "patient_register", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "patient_register", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "patient_occupational_history", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "patient_occupational_history", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "patient_occupational_history", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "patient_occupational_history", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "patient_occupational_history", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "patient_occupational_disease", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "patient_occupational_disease", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "patient_occupational_disease", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "patient_occupational_disease", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "patient_occupational_disease", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "patient", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "patient", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "patient", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "patient", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "patient", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "operate_log", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "operate_log", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "operate_log", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "operate_log", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "operate_log", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "oc_check_type", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "oc_check_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "oc_check_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "oc_check_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "oc_check_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "nation", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "nation", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "nation", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "nation", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "medical_type", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "medical_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "medical_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "medical_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "medical_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "medical_report_type", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "medical_report_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "medical_report_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "medical_report_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "medical_report_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "medical_package", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "medical_package", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "medical_package", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "medical_package", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "medical_package", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "medical_conclusion_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "medical_conclusion_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "medical_conclusion_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "medical_conclusion_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "medical_conclusion", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "medical_conclusion", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "medical_conclusion", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "medical_conclusion", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "medical_conclusion", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "mc", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "mc", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "mc", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "mc", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "mb", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "mb", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "mb", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "mb", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "marital_status", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "marital_status", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "marital_status", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "marital_status", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "ma", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "ma", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "ma", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "ma", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "lis_request", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "lis_request", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "lis_request", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "lis_request", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "lis_request", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "item_type", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "item_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "item_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "item_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "item_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "item_template", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "item_template", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "item_template", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "item_template", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "item_template", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "item_result_template_type", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "item_result_template_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "item_result_template_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "item_result_template_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "item_result_template_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "item_result_template", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "item_result_template", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "item_result_template", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "item_result_template", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "item_result_template", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "item_result_match", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "item_result_match", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "item_result_match", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "item_result_match", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "item_result_match", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "item_default_result", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "item_default_result", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "item_default_result", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "item_default_result", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "item_default_result", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "item", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "item", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "item", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "item", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "item", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "invoice_org", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "invoice_org", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "invoice_org", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "invoice_org", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "invoice_org", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "invoice_item_type", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "invoice_item_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "invoice_item_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "invoice_item_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "invoice_item_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "import_pacs_result", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "import_pacs_result", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "import_pacs_result", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "import_pacs_result", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "hello_type", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "hello_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "hello_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "hello_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "hello_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "hello_a", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "hello_a", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "hello_a", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "hello_a", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "hello_a", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "health_certificate", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "health_certificate", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "health_certificate", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "health_certificate", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "health_certificate", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "guide_type", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "guide_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "guide_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "guide_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "guide_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "grouping", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "grouping", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "grouping", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "grouping", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "grouping", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "for_sex", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "for_sex", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "for_sex", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "for_sex", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "follow_up_type", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "follow_up_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "follow_up_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "follow_up_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "follow_up_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "follow_up_plan", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "follow_up_plan", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "follow_up_plan", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "follow_up_plan", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "follow_up_plan", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "follow_up_mode", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "follow_up_mode", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "follow_up_mode", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "follow_up_mode", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "follow_up_mode", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "diagnosis_type", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "diagnosis_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "diagnosis_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "diagnosis_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "diagnosis_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "diagnosis_template", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "diagnosis_template", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "diagnosis_template", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "diagnosis_template", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "diagnosis_template", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "diagnosis_postfix", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "diagnosis_postfix", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "diagnosis_postfix", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "diagnosis_postfix", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "diagnosis_postfix", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "diagnosis_level", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "diagnosis_level", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "diagnosis_level", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "diagnosis_level", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "diagnosis_level", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "diagnosis", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "diagnosis", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "diagnosis", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "diagnosis", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "diagnosis", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "device_type", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "device_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "device_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "device_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "device_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "department", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "department", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "department", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "department", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "department", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "customer_org_type", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "customer_org_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "customer_org_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "customer_org_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "customer_org_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "customer_org_register", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "customer_org_register", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "customer_org_register", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "customer_org_register", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "customer_org_register", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "customer_org_group_detail", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "customer_org_group_detail", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "customer_org_group_detail", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "customer_org_group_detail", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "customer_org_group", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "customer_org_group", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "customer_org_group", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "customer_org_group", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "customer_org_group", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "customer_org_charge_pay", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "customer_org_charge_pay", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "customer_org_charge_pay", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "customer_org_charge_pay", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "customer_org_charge_pay", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "customer_org_charge_back", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "customer_org_charge_back", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "customer_org_charge_back", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "customer_org_charge_back", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "customer_org_charge_back", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "customer_org_charge", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "customer_org_charge", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "customer_org_charge", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "customer_org_charge", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "customer_org_charge", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "customer_org", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "customer_org", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "customer_org", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "customer_org", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "customer_org", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "critical_value_type", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "critical_value_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "critical_value_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "critical_value_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "critical_value_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "critical_value", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "critical_value", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "critical_value", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "critical_value", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "critical_value", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "contact_person", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "contact_person", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "contact_person", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "contact_person", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "contact_person", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "contact_method", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "contact_method", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "contact_method", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "contact_method", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "contact_method", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "common_char_type", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "common_char_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "common_char_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "common_char_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "common_char_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "common_char", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "common_char", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "common_char", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "common_char", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "common_char", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "charge_price_item", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "charge_price_item", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "charge_price_item", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "charge_price_item", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "charge_price_item", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "charge_back", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "charge_back", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "charge_back", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "charge_back", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "charge_back", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "charge_asbitem", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "charge_asbitem", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "charge_asbitem", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "charge_asbitem", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "charge_asbitem", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "charge", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "charge", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "charge", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "charge", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "charge", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "card_type", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "card_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "card_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "card_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "card_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "card_register", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "card_register", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "card_register", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "card_register", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "card_register", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "card_bill", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "card_bill", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "card_bill", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "card_bill", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "card_bill", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "birth_place", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "birth_place", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "birth_place", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "birth_place", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "birth_place", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "bigtext_result_type", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "bigtext_result_type", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "bigtext_result_type", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "bigtext_result_type", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "bigtext_result_type", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "bigtext_result_template", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "bigtext_result_template", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "bigtext_result_template", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "bigtext_result_template", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "bigtext_result_template", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "bigtext_result_description", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "bigtext_result_description", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "bigtext_result_description", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "bigtext_result_description", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "bigtext_result_description", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "bigtext_result_conclusion", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "bigtext_result_conclusion", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "bigtext_result_conclusion", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "bigtext_result_conclusion", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "bigtext_result_conclusion", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "asbitem_price_item", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "asbitem_price_item", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "asbitem_price_item", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "asbitem_price_item", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "asbitem_price_item", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "Id", + table: "asbitem", + newName: "id"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "asbitem", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "asbitem", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "asbitem", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "asbitem", + newName: "creation_time"); + + migrationBuilder.RenameColumn( + name: "LastModifierId", + table: "abp_user_department", + newName: "last_modifier_id"); + + migrationBuilder.RenameColumn( + name: "LastModificationTime", + table: "abp_user_department", + newName: "last_modification_time"); + + migrationBuilder.RenameColumn( + name: "CreatorId", + table: "abp_user_department", + newName: "creator_id"); + + migrationBuilder.RenameColumn( + name: "CreationTime", + table: "abp_user_department", + newName: "creation_time"); + + migrationBuilder.AlterColumn( + name: "creation_time", + table: "asbitem", + type: "timestamp without time zone", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldDefaultValueSql: "(date(timezone('UTC-8'::text, now())) - 1)"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "id", + table: "users", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "users", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "users", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "users", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "users", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "unit", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "unit", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "unit", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "unit", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "unit", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "title_type", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "title_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "title_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "title_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "title_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "sysdiagrams", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "sysdiagrams", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "sysdiagrams", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "sysdiagrams", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "sysdiagrams", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "sys_parm_value", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "sys_parm_value", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "sys_parm_value", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "sys_parm_value", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "sys_parm_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "sys_parm_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "sys_parm_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "sys_parm_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "sys_parm", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "sys_parm", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "sys_parm", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "sys_parm", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "symptom", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "symptom", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "symptom", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "symptom", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "symptom", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "summary_template", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "summary_template", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "summary_template", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "summary_template", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "summary_template", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "sum_summary_header", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "sum_summary_header", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "sum_summary_header", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "sum_summary_header", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "sum_summary_header", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "sum_summary_content", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "sum_summary_content", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "sum_summary_content", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "sum_summary_content", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "sum_summary_content", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "sum_suggestion_header", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "sum_suggestion_header", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "sum_suggestion_header", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "sum_suggestion_header", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "sum_suggestion_header", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "sum_suggestion_content", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "sum_suggestion_content", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "sum_suggestion_content", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "sum_suggestion_content", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "sum_suggestion_content", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "suggestion", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "suggestion", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "suggestion", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "suggestion", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "suggestion", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "sms_type", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "sms_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "sms_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "sms_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "sms_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "sms_template", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "sms_template", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "sms_template", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "sms_template", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "sms_template", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "sms_send", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "sms_send", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "sms_send", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "sms_send", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "sms_send", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "sex_hormone_term", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "sex_hormone_term", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "sex_hormone_term", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "sex_hormone_term", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "sex_hormone_reference_range", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "sex_hormone_reference_range", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "sex_hormone_reference_range", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "sex_hormone_reference_range", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "sex_hormone_reference_range", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "sex", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "sex", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "sex", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "sex", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "settle_account", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "settle_account", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "settle_account", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "settle_account", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "settle_account", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "service_trades", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "service_trades", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "service_trades", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "service_trades", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "service_trades", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "sample_type", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "sample_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "sample_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "sample_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "sample_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "sample_group", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "sample_group", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "sample_group", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "sample_group", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "sample_group", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "sample_container", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "sample_container", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "sample_container", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "sample_container", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "sample_container", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "room", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "room", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "room", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "room", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "room", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "result_status", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "result_status", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "result_status", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "result_status", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "report_printer", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "report_printer", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "report_printer", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "report_printer", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "report_printer", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "report_format_template", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "report_format_template", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "report_format_template", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "report_format_template", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "report_format_template", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "report_format", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "report_format", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "report_format", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "report_format", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "report_format", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "report", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "report", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "report", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "report", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "report", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "register_check_summary", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "register_check_summary", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "register_check_summary", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "register_check_summary", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "register_check_summary", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "register_check_suggestion", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "register_check_suggestion", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "register_check_suggestion", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "register_check_suggestion", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "register_check_suggestion", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "register_check_picture", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "register_check_picture", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "register_check_picture", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "register_check_picture", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "register_check_picture", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "register_check_item", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "register_check_item", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "register_check_item", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "register_check_item", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "register_check_critical_value", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "register_check_critical_value", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "register_check_critical_value", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "register_check_critical_value", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "register_check_critical_value", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "register_check", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "register_check", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "register_check", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "register_check", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "register_check", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "register_asbitem", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "register_asbitem", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "register_asbitem", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "register_asbitem", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "register_asbitem", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "reference_range", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "reference_range", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "reference_range", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "reference_range", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "reference_range", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "queue_register", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "queue_register", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "queue_register", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "queue_register", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "queue_register", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "primarykey_builder", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "primarykey_builder", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "primarykey_builder", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "primarykey_builder", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "price_item", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "price_item", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "price_item", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "price_item", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "price_item", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "position_type", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "position_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "position_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "position_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "position_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "poison_type", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "poison_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "poison_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "poison_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "poison_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "poison", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "poison", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "poison", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "poison", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "poison", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "phone_follow", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "phone_follow", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "phone_follow", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "phone_follow", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "phone_follow", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "personnel_type", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "personnel_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "personnel_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "personnel_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "personnel_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "patient_register", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "patient_register", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "patient_register", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "patient_register", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "patient_register", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "patient_occupational_history", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "patient_occupational_history", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "patient_occupational_history", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "patient_occupational_history", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "patient_occupational_history", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "patient_occupational_disease", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "patient_occupational_disease", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "patient_occupational_disease", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "patient_occupational_disease", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "patient_occupational_disease", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "patient", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "patient", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "patient", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "patient", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "patient", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "operate_log", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "operate_log", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "operate_log", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "operate_log", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "operate_log", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "oc_check_type", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "oc_check_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "oc_check_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "oc_check_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "oc_check_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "nation", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "nation", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "nation", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "nation", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "medical_type", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "medical_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "medical_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "medical_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "medical_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "medical_report_type", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "medical_report_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "medical_report_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "medical_report_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "medical_report_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "medical_package", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "medical_package", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "medical_package", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "medical_package", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "medical_package", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "medical_conclusion_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "medical_conclusion_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "medical_conclusion_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "medical_conclusion_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "medical_conclusion", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "medical_conclusion", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "medical_conclusion", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "medical_conclusion", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "medical_conclusion", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "mc", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "mc", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "mc", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "mc", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "mb", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "mb", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "mb", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "mb", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "marital_status", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "marital_status", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "marital_status", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "marital_status", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "ma", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "ma", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "ma", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "ma", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "lis_request", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "lis_request", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "lis_request", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "lis_request", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "lis_request", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "item_type", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "item_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "item_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "item_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "item_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "item_template", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "item_template", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "item_template", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "item_template", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "item_template", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "item_result_template_type", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "item_result_template_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "item_result_template_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "item_result_template_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "item_result_template_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "item_result_template", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "item_result_template", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "item_result_template", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "item_result_template", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "item_result_template", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "item_result_match", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "item_result_match", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "item_result_match", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "item_result_match", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "item_result_match", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "item_default_result", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "item_default_result", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "item_default_result", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "item_default_result", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "item_default_result", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "item", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "item", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "item", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "item", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "item", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "invoice_org", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "invoice_org", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "invoice_org", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "invoice_org", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "invoice_org", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "invoice_item_type", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "invoice_item_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "invoice_item_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "invoice_item_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "invoice_item_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "import_pacs_result", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "import_pacs_result", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "import_pacs_result", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "import_pacs_result", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "hello_type", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "hello_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "hello_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "hello_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "hello_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "hello_a", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "hello_a", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "hello_a", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "hello_a", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "hello_a", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "health_certificate", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "health_certificate", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "health_certificate", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "health_certificate", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "health_certificate", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "guide_type", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "guide_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "guide_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "guide_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "guide_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "grouping", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "grouping", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "grouping", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "grouping", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "grouping", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "for_sex", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "for_sex", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "for_sex", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "for_sex", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "follow_up_type", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "follow_up_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "follow_up_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "follow_up_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "follow_up_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "follow_up_plan", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "follow_up_plan", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "follow_up_plan", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "follow_up_plan", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "follow_up_plan", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "follow_up_mode", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "follow_up_mode", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "follow_up_mode", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "follow_up_mode", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "follow_up_mode", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "diagnosis_type", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "diagnosis_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "diagnosis_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "diagnosis_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "diagnosis_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "diagnosis_template", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "diagnosis_template", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "diagnosis_template", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "diagnosis_template", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "diagnosis_template", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "diagnosis_postfix", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "diagnosis_postfix", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "diagnosis_postfix", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "diagnosis_postfix", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "diagnosis_postfix", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "diagnosis_level", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "diagnosis_level", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "diagnosis_level", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "diagnosis_level", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "diagnosis_level", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "diagnosis", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "diagnosis", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "diagnosis", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "diagnosis", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "diagnosis", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "device_type", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "device_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "device_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "device_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "device_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "department", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "department", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "department", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "department", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "department", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "customer_org_type", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "customer_org_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "customer_org_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "customer_org_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "customer_org_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "customer_org_register", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "customer_org_register", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "customer_org_register", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "customer_org_register", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "customer_org_register", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "customer_org_group_detail", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "customer_org_group_detail", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "customer_org_group_detail", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "customer_org_group_detail", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "customer_org_group", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "customer_org_group", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "customer_org_group", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "customer_org_group", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "customer_org_group", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "customer_org_charge_pay", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "customer_org_charge_pay", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "customer_org_charge_pay", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "customer_org_charge_pay", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "customer_org_charge_pay", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "customer_org_charge_back", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "customer_org_charge_back", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "customer_org_charge_back", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "customer_org_charge_back", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "customer_org_charge_back", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "customer_org_charge", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "customer_org_charge", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "customer_org_charge", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "customer_org_charge", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "customer_org_charge", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "customer_org", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "customer_org", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "customer_org", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "customer_org", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "customer_org", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "critical_value_type", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "critical_value_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "critical_value_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "critical_value_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "critical_value_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "critical_value", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "critical_value", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "critical_value", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "critical_value", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "critical_value", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "contact_person", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "contact_person", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "contact_person", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "contact_person", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "contact_person", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "contact_method", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "contact_method", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "contact_method", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "contact_method", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "contact_method", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "common_char_type", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "common_char_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "common_char_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "common_char_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "common_char_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "common_char", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "common_char", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "common_char", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "common_char", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "common_char", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "charge_price_item", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "charge_price_item", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "charge_price_item", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "charge_price_item", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "charge_price_item", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "charge_back", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "charge_back", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "charge_back", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "charge_back", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "charge_back", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "charge_asbitem", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "charge_asbitem", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "charge_asbitem", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "charge_asbitem", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "charge_asbitem", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "charge", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "charge", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "charge", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "charge", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "charge", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "card_type", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "card_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "card_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "card_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "card_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "card_register", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "card_register", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "card_register", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "card_register", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "card_register", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "card_bill", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "card_bill", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "card_bill", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "card_bill", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "card_bill", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "birth_place", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "birth_place", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "birth_place", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "birth_place", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "birth_place", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "bigtext_result_type", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "bigtext_result_type", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "bigtext_result_type", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "bigtext_result_type", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "bigtext_result_type", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "bigtext_result_template", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "bigtext_result_template", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "bigtext_result_template", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "bigtext_result_template", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "bigtext_result_template", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "bigtext_result_description", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "bigtext_result_description", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "bigtext_result_description", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "bigtext_result_description", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "bigtext_result_description", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "bigtext_result_conclusion", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "bigtext_result_conclusion", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "bigtext_result_conclusion", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "bigtext_result_conclusion", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "bigtext_result_conclusion", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "asbitem_price_item", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "asbitem_price_item", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "asbitem_price_item", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "asbitem_price_item", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "asbitem_price_item", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "id", + table: "asbitem", + newName: "Id"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "asbitem", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "asbitem", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "asbitem", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "asbitem", + newName: "CreationTime"); + + migrationBuilder.RenameColumn( + name: "last_modifier_id", + table: "abp_user_department", + newName: "LastModifierId"); + + migrationBuilder.RenameColumn( + name: "last_modification_time", + table: "abp_user_department", + newName: "LastModificationTime"); + + migrationBuilder.RenameColumn( + name: "creator_id", + table: "abp_user_department", + newName: "CreatorId"); + + migrationBuilder.RenameColumn( + name: "creation_time", + table: "abp_user_department", + newName: "CreationTime"); + + migrationBuilder.AlterColumn( + name: "CreationTime", + table: "asbitem", + type: "timestamp without time zone", + nullable: false, + defaultValueSql: "(date(timezone('UTC-8'::text, now())) - 1)", + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone"); + } + } +} diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230825105319_i08252.Designer.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230825105319_i08252.Designer.cs new file mode 100644 index 0000000..f020e95 --- /dev/null +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230825105319_i08252.Designer.cs @@ -0,0 +1,11680 @@ +// +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("20230825105319_i08252")] + partial class i08252 + { + 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.HelloA", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ADesc") + .HasColumnType("text") + .HasColumnName("a_desc"); + + b.Property("AName") + .ValueGeneratedOnAdd() + .HasColumnType("text") + .HasDefaultValue("默认值") + .HasColumnName("a_name"); + + b.Property("AddTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("add_time") + .HasDefaultValueSql("now()"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("HelloTypeId") + .HasColumnType("text") + .HasColumnName("hello_type_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.ToTable("hello_a"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("TypeName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("type_name") + .HasComment("类型名称"); + + b.Property("s1") + .HasColumnType("uuid") + .HasColumnName("s1"); + + b.Property("s2") + .HasColumnType("uuid") + .HasColumnName("s2"); + + b.Property("s3") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("s3"); + + b.HasKey("Id"); + + b.ToTable("hello_type"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.Ma", b => + { + b.Property("Id") + .HasColumnType("text") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.HasKey("Id"); + + b.ToTable("ma"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.Mb", b => + { + b.Property("Id") + .HasColumnType("text") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MaId") + .HasColumnType("text") + .HasColumnName("ma_id"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.HasKey("Id"); + + b.HasIndex("MaId"); + + b.ToTable("mb"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.Mc", b => + { + b.Property("Id") + .HasColumnType("text") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MbId") + .HasColumnType("text") + .HasColumnName("mb_id"); + + b.Property("Name") + .HasColumnType("text") + .HasColumnName("name"); + + b.HasKey("Id"); + + b.HasIndex("MbId"); + + b.ToTable("mc"); + }); + + 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.Books.TestCT", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("TName") + .HasColumnType("text") + .HasColumnName("t_name"); + + b.HasKey("Id"); + + b.ToTable("test_ct"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AbpUserDepartment", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("UserId", "OrganizationUnitId") + .HasName("pk_user_organizationunitid"); + + b.ToTable("abp_user_department"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("编号"); + + b.Property("ClinicalMeaning") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("clinical_meaning") + .HasComment("临床意义"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DefaultResult") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("default_result") + .HasComment("默认结果"); + + b.Property("DeviceTypeId") + .HasColumnType("uuid") + .HasColumnName("device_type_id") + .IsFixedLength() + .HasComment("仪器类别"); + + b.Property("DiagnosisFunction") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("diagnosis_function") + .HasComment("诊断函数"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别,M-男,F-女,A-全部"); + + b.Property("InvoiceItemTypeId") + .HasColumnType("uuid") + .HasColumnName("invoice_item_type_id") + .IsFixedLength() + .HasComment("发票类别"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasComment("是启用"); + + b.Property("IsBeforeEat") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_before_eat") + .HasComment("餐前项目"); + + b.Property("IsCheck") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_check") + .HasComment("是检查项目"); + + b.Property("IsContinueProcess") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_continue_process") + .HasComment("诊断函数处理完毕后继续处理"); + + b.Property("IsDiagnosisFunction") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_diagnosis_function") + .HasComment("启用诊断函数"); + + b.Property("IsItemResultMerger") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_item_result_merger") + .HasComment("项目结果合并"); + + b.Property("IsPictureRotate") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_picture_rotate") + .HasComment("体检报告图片旋转90°"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Price") + .HasPrecision(8, 2) + .HasColumnType("numeric(8,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("QueueTime") + .HasPrecision(3, 1) + .HasColumnType("numeric(3,1)") + .HasColumnName("queue_time") + .HasComment("候诊时间"); + + b.Property("ShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("short_name") + .HasComment("简称"); + + 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() + .HasComment("项目编码"); + + 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() + .HasComment("单位科室ID"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目ID"); + + b.Property("ForSexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasComment("适用性别ID"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Guide") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("guide") + .HasComment("指引单内容"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount") + .HasComment("数量"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PriceItemId") + .HasColumnType("uuid") + .HasColumnName("price_item_id") + .IsFixedLength() + .HasComment("价表项目编码"); + + b.HasKey("Id"); + + b.ToTable("asbitem_price_item"); + + b.HasComment("组和项目包含价表项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultConclusion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("BigtextResultTemplateId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_template_id") + .IsFixedLength(); + + b.Property("Conclusion") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("conclusion") + .HasComment("结论"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("BigtextResultTemplateId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_template_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("description") + .HasComment("描述"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("BigtextResultTypeId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_type_id") + .IsFixedLength() + .HasComment("结果类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength() + .HasComment("父编号"); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CountryCode") + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("country_code") + .HasComment("国家标准码"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MobileTelephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("mobile_telephone") + .HasComment("手机"); + + 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(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") + .HasColumnName("id") + .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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .HasComment("收据号"); + + b.Property("ChargeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("charge_flag") + .HasDefaultValueSql("0"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id"); + + 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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .HasComment("退费编号"); + + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id") + .HasComment("结账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() + .HasComment("支付方式ID"); + + b.Property("BackMoeny") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("back_moeny") + .HasComment("退费金额"); + + b.Property("CardBillId") + .HasColumnType("uuid") + .HasColumnName("card_bill_id") + .HasComment("会员卡ID"); + + 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") + .HasComment("会员卡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") + .HasColumnName("id"); + + 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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CommonCharTypeId") + .HasColumnType("uuid") + .HasColumnName("common_char_type_id") + .IsFixedLength() + .HasComment("常用字符类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(1) + .HasColumnType("character varying(1)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ContactMethodType") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("contact_method_type") + .HasDefaultValueSql("'M'::bpchar") + .HasComment("联系方式类别-比如0-手机、1-电子邮箱"); + + b.Property("ContactMethodValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("contact_method_value") + .HasComment("联系方式,比如18911254911,839860190@qq.com"); + + b.Property("ContactPersonId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.HasIndex("ContactPersonId"); + + b.ToTable("contact_method"); + + b.HasComment("联系方式新增量主键,更新映射关系"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("客户单位编号"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("姓名"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("Title") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("title") + .HasComment("职务"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CriticalValueTypeId") + .HasColumnType("uuid") + .HasColumnName("critical_value_type_id") + .IsFixedLength() + .HasComment("危急值类别编号"); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength() + .HasComment("父编号"); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + 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") + .HasColumnName("id") + .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("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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") + .HasComment("开票名称"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasDefaultValueSql("0") + .HasComment("状态"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock") + .HasComment("锁住"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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() + .HasComment("父编号"); + + b.Property("PathCode") + .HasMaxLength(60) + .HasColumnType("character varying(60)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + 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") + .HasComment("简称"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + 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") + .HasColumnName("id"); + + b.Property("ChargeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("charge_flag") + .HasComment("收退费标志"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id") + .HasComment("客户单位登记ID"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Payer") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("payer") + .HasComment("付款人"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id") + .HasComment("结算账户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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CustomerOrgChargeId") + .HasColumnType("uuid") + .HasColumnName("customer_org_charge_id") + .HasComment("收费编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id") + .HasComment("结算账户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() + .HasComment("支付方式"); + + b.Property("BackMoeny") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("back_moeny") + .HasComment("退费金额"); + + 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") + .HasColumnName("id"); + + b.Property("ChargeMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_money") + .HasComment("支付金额"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength() + .HasComment("支付方式"); + + 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") + .HasColumnName("id") + .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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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() + .HasComment("分组编号"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + 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") + .HasColumnName("id"); + + 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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MedicalTimes") + .HasColumnType("smallint") + .HasColumnName("medical_times") + .HasComment("单位体检次数"); + + b.Property("RegisterName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("register_name") + .HasComment("计划名称"); + + b.Property("RegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("register_no") + .HasComment("计划号"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CodePrefix") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("code_prefix"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("仪器类别编号"); + + b.Property("CheckTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("check_type_flag"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_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("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DiagnosisLevelId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_level_id") + .HasComment("诊断级别"); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别"); + + b.Property("IsIll") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_ill") + .HasComment("是疾病"); + + b.Property("IsSummaryTemplate") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_summary_template") + .HasComment("是总检模板"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("simple_code"); + + b.Property("SuggestionName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_name") + .HasComment("建议名称"); + + 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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.ToTable("diagnosis_level"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisPostfix", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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() + .HasComment("诊断模板编号"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断编号"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength() + .HasComment("父编号"); + + b.Property("PathCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + b.HasKey("Id"); + + b.ToTable("diagnosis_type"); + + b.HasComment("诊断类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpMode", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("follow_up_mode"); + + b.HasComment("随访方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpPlan", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content") + .HasComment("随访内容"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CycleDays") + .HasColumnType("smallint") + .HasColumnName("cycle_days") + .HasComment("周期天数"); + + b.Property("DoctorUserId") + .HasColumnType("uuid") + .HasColumnName("doctor_user_id") + .HasComment("医生"); + + b.Property("FollowUpModeId") + .HasColumnType("uuid") + .HasColumnName("follow_up_mode_id") + .IsFixedLength() + .HasComment("随访方式"); + + b.Property("FollowUpTypeId") + .HasColumnType("uuid") + .HasColumnName("follow_up_type_id") + .IsFixedLength() + .HasComment("随访类别"); + + b.Property("IsLoop") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_loop") + .HasComment("是否循环"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PerfomFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("perfom_flag") + .HasComment("执行标志"); + + b.Property("PerfomTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("perfom_time") + .HasComment("执行时间"); + + b.Property("PerfomUserId") + .HasColumnType("uuid") + .HasColumnName("perfom_user_id") + .HasComment("执行者用户ID"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("Id"); + + b.ToTable("follow_up_plan"); + + b.HasComment("随访计划"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("follow_up_type"); + + b.HasComment("随访类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ForSex", b => + { + b.Property("Id") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("for_sex"); + + b.HasComment("适用性别设置,固定编码"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Grouping", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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"); + + b.HasComment("废弃"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.GuideType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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("CheckRequestNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("check_request_no"); + + 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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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("CheckRequestNo"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CalculationFunction") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("calculation_function") + .HasComment("计算函数"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DefaultResult") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("default_result") + .HasComment("默认结果"); + + b.Property("DiagnosisFunction") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("diagnosis_function") + .HasComment("诊断函数"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("EnglishShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("english_short_name") + .HasComment("英文缩写"); + + b.Property("InputCheck") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("input_check") + .HasComment("输入结果校验公式"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasComment("启用"); + + b.Property("IsCalculationItem") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_calculation_item") + .HasComment("是计算项目"); + + b.Property("IsContinueProcess") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_continue_process") + .HasComment("是继续处理"); + + b.Property("IsDiagnosisFunction") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_diagnosis_function") + .HasComment("启用诊断函数"); + + b.Property("IsNameIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_into_summary") + .HasComment("名称进入小结"); + + b.Property("IsProduceSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_produce_summary") + .HasComment("是生成小结"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("PriceItemId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("price_item_id") + .IsFixedLength() + .HasComment("价表项目编码"); + + b.Property("ReferenceRangeTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("reference_range_type_flag") + .HasDefaultValueSql("'E'::bpchar") + .HasComment("参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素"); + + b.Property("ResultTemplateTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("result_template_type_flag") + .HasDefaultValueSql("0") + .HasComment("结果模板类别标志"); + + b.Property("SimpleCode") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("simple_code"); + + b.Property("UnitId") + .HasColumnType("uuid") + .HasColumnName("unit_id") + .IsFixedLength() + .HasComment("单位"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("结果匹配编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("结果模板编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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() + .HasComment("项目编号"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CheckTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("check_type_flag") + .HasDefaultValueSql("'G'::bpchar") + .HasComment("检查类别,0-普通检查,1-检验,2-影像检查"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("GuidTypeId") + .HasColumnType("uuid") + .HasColumnName("guid_type_id") + .IsFixedLength() + .HasComment("指引类别"); + + b.Property("IsMergeAsbitem") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_merge_asbitem") + .HasComment("合并组合项目,Y-是,N-否"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MedicalReportTypeId") + .HasColumnType("uuid") + .HasColumnName("medical_report_type_id") + .IsFixedLength() + .HasComment("体检报告类别"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength() + .HasComment("父id"); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + 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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print") + .HasComment("是否已打印"); + + b.Property("IsSignIn") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_sign_in") + .HasComment("是签收"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("LisRequestNo") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("lis_request_no") + .HasComment("检验申请单号"); + + b.Property("SampleGroupId") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("条码分组ID"); + + b.Property("Sampler") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("sampler") + .HasComment("采样人姓名"); + + b.Property("SamplingTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("sampling_time") + .HasComment("采样时间"); + + b.Property("SignInOrder") + .HasColumnType("integer") + .HasColumnName("sign_in_order") + .HasComment("签收顺序"); + + b.Property("SignInPerson") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("sign_in_person") + .HasComment("签收人姓名"); + + b.Property("SignInTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("sign_in_time") + .HasComment("签收时间"); + + b.HasKey("Id"); + + b.HasIndex("SampleGroupId"); + + b.HasIndex(new[] { "LisRequestNo" }, "ix_lis_request") + .IsUnique(); + + b.ToTable("lis_request"); + + b.HasComment("检验申请单"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MaritalStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("婚姻状况编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name") + .HasComment("婚姻状况名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("体检结论编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_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("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MedicalConclusionTypeId") + .HasMaxLength(2) + .HasColumnType("character(2)") + .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") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("套餐主档编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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() + .HasComment("组合项目编号"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("体检类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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("NationId") + .HasMaxLength(3) + .HasColumnType("character(3)") + .HasColumnName("nation_id") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CountryCode") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("country_code"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_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("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.HasKey("NationId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_nation") + .IsUnique(); + + b.ToTable("nation"); + + b.HasComment("民族设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OcCheckType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("职业病检查类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id"); + + b.Property("ComputerName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("computer_name"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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() + .HasComment("客户单位编号"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength() + .HasComment("体检中心编号"); + + 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") + .HasColumnName("id"); + + b.Property("Address") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("address") + .HasComment("地址"); + + b.Property("BirthDate") + .HasColumnType("date") + .HasColumnName("birth_date") + .HasComment("出生日期"); + + b.Property("BirthPlaceId") + .HasColumnType("uuid") + .HasColumnName("birth_place_id") + .IsFixedLength() + .HasComment("出生地"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name") + .HasComment("姓名"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("email") + .HasComment("email"); + + b.Property("IdNo") + .HasMaxLength(18) + .HasColumnType("character varying(18)") + .HasColumnName("id_no") + .HasComment("身份证号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MaritalStatusId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasComment("婚姻状况"); + + b.Property("MobileTelephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("mobile_telephone") + .HasComment("手机号"); + + b.Property("NationId") + .HasColumnType("text") + .HasColumnName("nation_id") + .IsFixedLength() + .HasComment("民族编号"); + + b.Property("PatientNo") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("patient_no") + .HasComment("档案号"); + + b.Property("PatientPassword") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("patient_password") + .HasComment("登录密码"); + + b.Property("PostalCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("postal_code") + .HasComment("邮政编码"); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id") + .HasComment("性别"); + + b.Property("Telephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("telephone") + .HasComment("电话"); + + b.HasKey("Id"); + + b.HasIndex("PatientNo") + .IsUnique(); + + 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") + .HasColumnName("id"); + + 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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id"); + + b.Property("BeginDate") + .HasColumnType("date") + .HasColumnName("begin_date"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("EndDate") + .HasColumnType("date") + .HasColumnName("end_date"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .HasComment("登记流水号"); + + b.Property("Age") + .HasColumnType("smallint") + .HasColumnName("age") + .HasComment("年龄"); + + b.Property("AuditDate") + .HasColumnType("date") + .HasColumnName("audit_date") + .HasComment("审核日期"); + + b.Property("AuditDoctor") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("audit_doctor") + .HasComment("审核医生"); + + b.Property("BirthDate") + .HasColumnType("date") + .HasColumnName("birth_date") + .HasComment("出生日期"); + + 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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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") + .HasComment("客户单位登记ID"); + + b.Property("GuidePrintTimes") + .HasColumnType("smallint") + .HasColumnName("guide_print_times") + .HasComment("指引单打印次数"); + + b.Property("InterposeMeasure") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("interpose_measure") + .HasComment("干预措施"); + + b.Property("IsAudit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_audit") + .HasComment("审核"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock") + .HasComment("锁住"); + + 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") + .HasComment("隐藏姓名"); + + b.Property("IsPhoneFollow") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_phone_follow") + .HasComment("电话随访"); + + b.Property("IsRecoverGuide") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_recover_guide") + .HasComment("指引单收回"); + + b.Property("IsUpload") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_upload") + .HasComment("是否上传到WEB"); + + b.Property("IsVip") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_vip") + .HasComment("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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasComment("体检卡号"); + + 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") + .HasComment("体检中心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(30) + .HasColumnType("character varying(30)") + .HasColumnName("patient_register_no") + .HasComment("条码号"); + + b.Property("PersonnelTypeId") + .HasColumnType("uuid") + .HasColumnName("personnel_type_id") + .IsFixedLength() + .HasComment("人员类别"); + + b.Property("Photo") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("photo") + .HasComment("照片"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + 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") + .HasComment("性激素期限"); + + 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(50) + .HasColumnType("character varying(50)") + .HasColumnName("summary_doctor") + .HasComment("总检医生"); + + b.Property("ThirdInfo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("third_info") + .HasComment("附加第三方信息"); + + b.HasKey("Id"); + + b.HasIndex("MaritalStatusId"); + + 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"); + + b.HasComment("职业病-体检病人症状"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PayMode", b => + { + b.Property("Id") + .HasMaxLength(4) + .HasColumnType("character varying(4)") + .HasColumnName("id") + .HasComment("编号,固定编码"); + + 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("Id"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("人员类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("FollowContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("follow_content") + .HasComment("随访内容"); + + b.Property("FollowUpPlanId") + .HasColumnType("uuid") + .HasColumnName("follow_up_plan_id") + .HasComment("随访计划ID"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("ReplyContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("reply_content") + .HasComment("回复内容"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("phone_follow"); + + b.HasComment("电话随访"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Poison", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength() + .HasComment("毒害编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_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("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("毒害类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_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("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("职务编号"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time") + .HasComment("最后修改日期"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id") + .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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("InvoiceItemTypeId") + .HasColumnType("uuid") + .HasColumnName("invoice_item_type_id") + .IsFixedLength() + .HasComment("发票项目类别ID"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("PriceItemCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("price_item_code") + .HasComment("价表编码"); + + 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("PrimarykeyBuilderId") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("primarykey_builder_id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DateString") + .HasMaxLength(8) + .HasColumnType("character(8)") + .HasColumnName("date_string") + .IsFixedLength() + .HasComment("日期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SerialNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("serial_no") + .HasComment("序列号"); + + b.HasKey("PrimarykeyBuilderId"); + + b.ToTable("primarykey_builder"); + + b.HasComment("主键产生器"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.QueueRegister", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("CallTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("call_time") + .HasComment("叫号时间"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("0") + .HasComment("完成标志"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("排队顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("NoCompleteReason") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_complete_reason") + .HasDefaultValueSql("0") + .HasComment("未完成原因"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("RoomId") + .HasColumnType("uuid") + .HasColumnName("room_id") + .IsFixedLength() + .HasComment("房间ID"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("queue_register"); + + b.HasComment("排队登记"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReferenceRange", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("LowerDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("lower_diagnosis_id") + .IsFixedLength() + .HasComment("偏低诊断"); + + b.Property("ReferenceRangeTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("reference_range_type_flag") + .HasComment("参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素"); + + 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("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .HasComment("主键"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount") + .HasComment("数量"); + + b.Property("AsbitemId") + .HasMaxLength(6) + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price") + .HasComment("实收价格"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("GroupPackageId") + .HasColumnType("uuid") + .HasColumnName("group_package_id"); + + b.Property("IsCharge") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_charge") + .HasComment("是否已收费"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("LisRequestId") + .HasColumnType("uuid") + .HasColumnName("lis_request_id") + .HasComment("LIS申请ID"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("登记流水号"); + + b.Property("PayTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(4) + .HasColumnType("character varying(4)") + .HasColumnName("pay_type_flag") + .HasDefaultValueSql("0") + .HasComment("支付方式,比如是自费、免费、单位支付"); + + b.Property("StandardPrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("standard_price") + .HasComment("标准价格"); + + b.HasKey("Id"); + + 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") + .HasColumnName("id"); + + b.Property("AuditTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("audit_time") + .HasComment("审核时间"); + + b.Property("AuditorUserId") + .HasColumnType("uuid") + .HasColumnName("auditor_user_id") + .HasComment("审核医生ID"); + + b.Property("CheckDate") + .HasColumnType("date") + .HasColumnName("check_date") + .HasComment("检查日期"); + + b.Property("CheckDoctorId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("check_doctor_id") + .HasComment("检查医生ID"); + + b.Property("CheckRequestNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("check_request_no") + .HasComment("检查单号"); + + b.Property("CheckRequestPrintTimes") + .HasColumnType("smallint") + .HasColumnName("check_request_print_times") + .HasComment("检查申请单打印次数"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("0") + .HasComment("完成标志"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value") + .HasComment("危急值"); + + b.Property("CriticalValueCreateDate") + .HasColumnType("date") + .HasColumnName("critical_value_create_date") + .HasComment("危急值创建日期"); + + b.Property("CriticalValueFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("critical_value_flag") + .HasDefaultValueSql("0") + .HasComment("危急值标志"); + + b.Property("CriticalValueProcessContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value_process_content") + .HasComment("危急值处理内容"); + + b.Property("CriticalValueProcessDate") + .HasColumnType("date") + .HasColumnName("critical_value_process_date") + .HasComment("危急值处理日期"); + + b.Property("CriticalValueProcessDoctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("critical_value_process_doctor") + .HasComment("危急值处理医生"); + + b.Property("CriticalValueProcessFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("critical_value_process_flag") + .HasComment("危急值处理标志"); + + b.Property("IsAudit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_audit") + .HasComment("是审核"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock") + .HasComment("是否锁住"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("RegisterAsbitemId") + .HasColumnType("uuid") + .HasColumnName("register_asbitem_id"); + + b.Property("ThirdInfo") + .HasMaxLength(80) + .HasColumnType("character varying(80)") + .HasColumnName("third_info") + .HasComment("第三方信息"); + + b.HasKey("Id"); + + b.HasIndex("RegisterAsbitemId"); + + 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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value") + .HasComment("危急值"); + + b.Property("Doctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("doctor") + .HasComment("处理医生"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasComment("是否完成"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ProcessTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("process_type_flag") + .HasComment("处理类别标志"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记检查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(50) + .HasColumnType("character varying(50)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value") + .HasComment("危急值范围"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value") + .HasComment("危急值"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasComment("单位"); + + 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") + .HasColumnName("id") + .HasComment("检查图片编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记检查ID"); + + b.Property("Suggestion") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion") + .HasComment("建议"); + + 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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记检查ID"); + + b.Property("Summary") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("summary") + .HasComment("综述"); + + b.Property("SummaryFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("summary_flag") + .HasComment("综述标志"); + + b.HasKey("Id"); + + b.HasIndex("RegisterCheckId"); + + b.ToTable("register_check_summary"); + + b.HasComment("登记检查综述"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Report", b => + { + b.Property("Id") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("id") + .HasComment("主键Id"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("display_name") + .HasComment("报表名称"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasDefaultValue('N') + .HasColumnName("is_active") + .HasComment("启用标志(N:禁用,Y:启用)"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.ToTable("report"); + + b.HasComment("自定义报表主表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReportFormat", b => + { + b.Property("Id") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("id") + .HasComment("主键Id"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("display_name") + .HasComment("格式名称"); + + b.Property("IsDefault") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasDefaultValue('N') + .HasColumnName("isDefault") + .HasComment("默认标志(N:不默认,Y:默认)"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ReportId") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("report_id") + .HasComment("报表ID"); + + b.HasKey("Id"); + + b.HasIndex("ReportId"); + + b.ToTable("report_format"); + + b.HasComment("自定义报表格式表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReportFormatTemplate", b => + { + b.Property("Id") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("id") + .HasComment("主键Id"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DataSetJson") + .HasColumnType("text") + .HasColumnName("data_set_json") + .HasComment("模板文件"); + + b.Property("DisplayName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("display_name") + .HasComment("模板名称"); + + b.Property("IsDefault") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasDefaultValue('N') + .HasColumnName("isDefault") + .HasComment("是否默认(N:不默认,Y:默认)"); + + b.Property("IsSystem") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasDefaultValue('N') + .HasColumnName("isSystem") + .HasComment("是否系统自定义(N:停用,Y:启用)"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ReportFormatId") + .HasColumnType("character varying(16)") + .HasColumnName("report_format_id") + .HasComment("报表格式ID"); + + b.Property("TemplateFile") + .HasColumnType("text") + .HasColumnName("template_file") + .HasComment("模板文件"); + + b.Property("TemplateFileType") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("template_file_type") + .HasDefaultValueSql("1") + .HasComment("模板文件类型(0:FastReport,1:Grid++Report)"); + + b.HasKey("Id"); + + b.HasIndex("ReportFormatId"); + + b.ToTable("report_format_template"); + + b.HasComment("自定义报表格式模板表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReportPrinter", b => + { + b.Property("Id") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("id") + .HasComment("主键Id"); + + b.Property("ComputerName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("pc_name") + .HasComment("计算机名称"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PrinterName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("printer_name") + .HasComment("打印机名称"); + + b.Property("ReportId") + .HasColumnType("character varying(16)") + .HasColumnName("report_id") + .HasComment("报表ID"); + + b.HasKey("Id"); + + b.HasIndex("ReportId"); + + b.ToTable("report_printer"); + + b.HasComment("自定义报表客户端打印机设置表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ResultStatus", b => + { + b.Property("Id") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DataInputBackgroundColor") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("data_input_background_color") + .HasDefaultValueSql("16777215") + .HasComment("数据录入报告单颜色"); + + b.Property("DataInputFontColor") + .HasColumnType("integer") + .HasColumnName("data_input_font_color") + .HasComment("数据录入字体颜色"); + + b.Property("DataInputPrompt") + .HasMaxLength(8) + .HasColumnType("character varying(8)") + .HasColumnName("data_input_prompt") + .HasComment("数据录入提示"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ReportBackgroundColor") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("report_background_color") + .HasDefaultValueSql("16777215") + .HasComment("报告单背景颜色"); + + b.Property("ReportFontColor") + .HasColumnType("integer") + .HasColumnName("report_font_color") + .HasComment("报告单字体颜色"); + + b.Property("ReportPrompt") + .HasMaxLength(8) + .HasColumnType("character varying(8)") + .HasColumnName("report_prompt") + .HasComment("报告单提示"); + + b.HasKey("Id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength() + .HasComment(""); + + 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() + .HasComment("项目类别编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("ContainerColor") + .HasColumnType("integer") + .HasColumnName("container_color") + .HasComment("颜色"); + + b.Property("ContainerColorName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("container_color_name") + .HasComment("颜色名"); + + b.Property("ContainerRemark") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("container_remark"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SampleContainerId") + .HasColumnType("uuid") + .HasColumnName("sample_container_id") + .IsFixedLength() + .HasComment("标本容器ID"); + + b.Property("SampleTypeId") + .HasColumnType("uuid") + .HasColumnName("sample_type_id") + .IsFixedLength() + .HasComment("标本类型ID"); + + 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() + .HasComment("组合项目编号"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id"); + + b.Property("CompletedBy") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("completed_by") + .HasComment("结账人"); + + b.Property("CompletedTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("completed_time") + .HasComment("结账时间"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasComment("是完成"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("Id"); + + b.ToTable("settle_account"); + + b.HasComment("结账"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Sex", b => + { + b.Property("Id") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sex"); + + b.HasComment("性别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneReferenceRange", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + 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("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value") + .HasComment("危急值参考范围"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("LowerDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("lower_diagnosis_id") + .IsFixedLength() + .HasComment("下限诊断"); + + b.Property("ReferenceRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("reference_range_value") + .HasComment("参考范围"); + + b.Property("SexHormoneTermId") + .HasColumnType("uuid") + .HasColumnName("sex_hormone_term_id") + .IsFixedLength() + .HasComment("性激素期限ID"); + + b.Property("UpperDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("upper_diagnosis_id") + .IsFixedLength() + .HasComment("上限诊断"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id"); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content") + .HasComment("短信内容"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("FollowUpPlanId") + .HasColumnType("uuid") + .HasColumnName("follow_up_plan_id") + .HasComment("随访计划ID"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasComment("是完成"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MobileTelephone") + .HasMaxLength(11) + .HasColumnType("character varying(11)") + .HasColumnName("mobile_telephone") + .HasComment("手机号"); + + b.Property("PatientId") + .HasMaxLength(10) + .HasColumnType("uuid") + .HasColumnName("patient_id") + .HasComment("人员ID"); + + b.Property("PatientName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("patient_name") + .HasComment("姓名"); + + b.Property("SmsTypeId") + .HasColumnType("uuid") + .HasColumnName("sms_type_id") + .IsFixedLength() + .HasComment("短信类别ID"); + + b.HasKey("Id"); + + b.ToTable("sms_send"); + + b.HasComment("短信发送"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content") + .HasComment("短信内容"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("SmsTypeId") + .HasColumnType("uuid") + .HasColumnName("sms_type_id") + .IsFixedLength() + .HasComment("短信类别ID"); + + b.HasKey("Id"); + + b.ToTable("sms_template"); + + b.HasComment("短信模板"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sms_type"); + + b.HasComment("短信类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Suggestion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断ID"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SuggestionContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("suggestion_content") + .HasComment("建议内容"); + + 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") + .HasComment("病人登记ID"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断ID"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SumSuggestionHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_suggestion_header_id") + .HasComment("建议头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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("TemplateContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("template_content") + .HasComment("模板内容"); + + 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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SuggestionContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_content") + .HasComment("建议内容"); + + b.Property("SumSuggestionHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_suggestion_header_id") + .HasComment("建议头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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("SuggestionFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("suggestion_flag") + .HasComment("建议标志"); + + b.Property("SuggestionTitle") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_title") + .HasComment("建议标题"); + + 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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SumSummaryHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_summary_header_id") + .HasComment("建议头ID"); + + b.Property("SummaryContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("summary_content") + .HasComment("建议内容"); + + 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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("SummaryFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("summary_flag") + .HasComment("综述标志"); + + b.Property("SummaryTitle") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("summary_title") + .HasComment("综述标题"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("症状编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_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("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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"); + + b.HasComment("不是本软件的表,估计是系统自动生成的"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => + { + b.Property("Id") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name") + .HasComment("参数名"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("SimpleCode") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("simple_code"); + + b.Property("SysParmTypeId") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("sys_parm_type_id") + .HasComment("参数类别ID"); + + b.Property("ValueType") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("value_type") + .HasComment("结果类别"); + + b.HasKey("Id"); + + b.HasIndex("SysParmTypeId"); + + b.ToTable("sys_parm"); + + b.HasComment("系统参数设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmType", b => + { + b.Property("Id") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ParentId") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("parent_id") + .HasComment("父ID"); + + b.Property("SimpleCode") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sys_parm_type"); + + b.HasComment("系统参数类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValue", b => + { + b.Property("SysParmId") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("sys_parm_id") + .HasComment("参数ID"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength() + .HasComment("单位ID"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("ParmValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("parm_value") + .HasComment("参数值"); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("remark") + .HasComment("备注"); + + 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") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("sys_parm_id"); + + b.Property("ValueOption") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("value_option") + .HasComment("可选项"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("ValueOptionName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("value_option_name") + .HasComment("可选项名"); + + 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") + .HasColumnName("id") + .IsFixedLength() + .HasComment("职称类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_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("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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") + .HasColumnName("id"); + + b.Property("Address") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("address"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + 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("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + 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"); + + b.HasComment("用户表,废弃"); + }); + + 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"); + + b.HasComment("用户组权限-废弃"); + }); + + 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() + .HasComment("项目类别ID"); + + 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"); + + b.HasComment("用户控件权限-废弃"); + }); + + 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") + .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("IsPeis") + .HasMaxLength(1) + .HasColumnType("character varying(1)"); + + 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.Mb", b => + { + b.HasOne("Shentun.Peis.Books.Ma", "Ma") + .WithMany("Mbs") + .HasForeignKey("MaId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_mb_ma_1"); + + b.Navigation("Ma"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.Mc", b => + { + b.HasOne("Shentun.Peis.Books.Mb", "Mb") + .WithMany("Mcs") + .HasForeignKey("MbId") + .HasConstraintName("fk_mc_mb_1"); + + b.Navigation("Mb"); + }); + + 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.Navigation("CardType"); + }); + + 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.SampleGroup", "SampleGroup") + .WithMany("LisRequests") + .HasForeignKey("SampleGroupId") + .IsRequired() + .HasConstraintName("fk_lis_request_sample_group"); + + b.Navigation("SampleGroup"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusion", b => + { + b.HasOne("Shentun.Peis.Models.MedicalConclusionType", "MedicalConclusionType") + .WithMany("MedicalConclusions") + .HasForeignKey("MedicalConclusionTypeId") + .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.MaritalStatus", "MaritalStatus") + .WithMany("PatientRegisters") + .HasForeignKey("MaritalStatusId") + .HasConstraintName("fk_patient_register_marital_status_id"); + + b.HasOne("Shentun.Peis.Models.Patient", "Patient") + .WithMany("PatientRegisters") + .HasForeignKey("PatientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient_register_patient"); + + b.Navigation("MaritalStatus"); + + b.Navigation("Patient"); + }); + + 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") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_register_reference_patient_"); + + b.Navigation("Asbitem"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheck", b => + { + b.HasOne("Shentun.Peis.Models.RegisterAsbitem", "RegisterAsbitem") + .WithMany("RegisterChecks") + .HasForeignKey("RegisterAsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registercheck_registerasbitem"); + + b.Navigation("RegisterAsbitem"); + }); + + 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.ReportFormat", b => + { + b.HasOne("Shentun.Peis.Models.Report", "Report") + .WithMany("ReportFormats") + .HasForeignKey("ReportId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_reportformat_report_1"); + + b.Navigation("Report"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReportFormatTemplate", b => + { + b.HasOne("Shentun.Peis.Models.ReportFormat", "ReportFormat") + .WithMany("ReportFormatTemplates") + .HasForeignKey("ReportFormatId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_reportformattemplate_reportprinter_1"); + + b.Navigation("ReportFormat"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReportPrinter", b => + { + b.HasOne("Shentun.Peis.Models.Report", "Report") + .WithMany("ReportPrinters") + .HasForeignKey("ReportId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_reportprinter_report_1"); + + b.Navigation("Report"); + }); + + 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") + .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.Ma", b => + { + b.Navigation("Mbs"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.Mb", b => + { + b.Navigation("Mcs"); + }); + + 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"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Department", b => + { + 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.Patient", b => + { + b.Navigation("PatientRegisters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => + { + b.Navigation("Charges"); + + b.Navigation("HealthCertificate"); + + 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.RegisterAsbitem", b => + { + b.Navigation("RegisterChecks"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheck", b => + { + b.Navigation("RegisterCheckItems"); + + b.Navigation("RegisterCheckPictures"); + + b.Navigation("RegisterCheckSuggestions"); + + b.Navigation("RegisterCheckSummaries"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Report", b => + { + b.Navigation("ReportFormats"); + + b.Navigation("ReportPrinters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReportFormat", b => + { + b.Navigation("ReportFormatTemplates"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ResultStatus", b => + { + b.Navigation("RegisterCheckItems"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleContainer", b => + { + b.Navigation("SampleGroups"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => + { + b.Navigation("LisRequests"); + + b.Navigation("SampleGroupDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleType", b => + { + 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/20230825105319_i08252.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230825105319_i08252.cs new file mode 100644 index 0000000..8677284 --- /dev/null +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230825105319_i08252.cs @@ -0,0 +1,25 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Shentun.Peis.Migrations +{ + public partial class i08252 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "isActive", + table: "report", + newName: "is_active"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "is_active", + table: "report", + newName: "isActive"); + } + } +} diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs index 3934c64..920d58e 100644 --- a/src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs @@ -101,7 +101,8 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Books.HelloA", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("ADesc") .HasColumnType("text") @@ -121,11 +122,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("HelloTypeId") .HasColumnType("text") @@ -133,11 +134,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.HasKey("Id"); @@ -147,23 +148,24 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Books.HelloType", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("TypeName") .HasMaxLength(10) @@ -197,19 +199,19 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("Name") .HasColumnType("text") @@ -228,19 +230,19 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("MaId") .HasColumnType("text") @@ -265,19 +267,19 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("MbId") .HasColumnType("text") @@ -438,19 +440,19 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.HasKey("UserId", "OrganizationUnitId") .HasName("pk_user_organizationunitid"); @@ -462,6 +464,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength() .HasComment("编号"); @@ -472,14 +475,12 @@ namespace Shentun.Peis.Migrations .HasComment("临床意义"); b.Property("CreationTime") - .ValueGeneratedOnAdd() .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime") - .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DefaultResult") .HasMaxLength(100) @@ -573,11 +574,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("Price") .HasPrecision(8, 2) @@ -693,6 +694,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("Amount") @@ -708,19 +710,19 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("PriceItemId") .HasColumnType("uuid") @@ -739,6 +741,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("BigtextResultTemplateId") @@ -754,11 +757,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayOrder") .ValueGeneratedOnAdd() @@ -768,11 +771,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.HasKey("Id"); @@ -787,6 +790,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("BigtextResultTemplateId") @@ -796,11 +800,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("Description") .HasMaxLength(200) @@ -816,11 +820,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.HasKey("Id"); @@ -835,6 +839,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("BigtextResultTypeId") @@ -845,11 +850,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(50) @@ -863,11 +868,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(50) @@ -887,15 +892,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -915,11 +921,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("ParentId") .HasColumnType("uuid") @@ -951,6 +957,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CountryCode") @@ -961,11 +968,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(50) @@ -980,11 +987,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(50) @@ -1005,6 +1012,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .HasComment("编号"); b.Property("BillFlag") @@ -1028,19 +1036,19 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("PayModeId") .ValueGeneratedOnAdd() @@ -1066,6 +1074,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .HasComment("编号"); b.Property("CardFlag") @@ -1095,11 +1104,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("CustomerName") .HasMaxLength(20) @@ -1127,11 +1136,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("MobileTelephone") .HasMaxLength(20) @@ -1167,6 +1176,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength() .HasComment("编号"); @@ -1180,11 +1190,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("Discount") .ValueGeneratedOnAdd() @@ -1213,11 +1223,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("Remark") .HasMaxLength(50) @@ -1236,6 +1246,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .HasComment("收据号"); b.Property("ChargeFlag") @@ -1247,11 +1258,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("InvoiceNo") .HasMaxLength(30) @@ -1265,11 +1276,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("PatientRegisterId") .HasColumnType("uuid") @@ -1294,7 +1305,8 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.ChargeAsbitem", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("Amount") .HasColumnType("smallint") @@ -1319,19 +1331,19 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("RegisterAsbitemId") .HasColumnType("uuid") @@ -1352,6 +1364,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .HasComment("退费编号"); b.Property("ChargeId") @@ -1361,19 +1374,19 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SettleAccountId") .HasColumnType("uuid") @@ -1463,7 +1476,8 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.ChargePriceItem", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("Amount") .HasColumnType("smallint") @@ -1480,19 +1494,19 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("PriceItemId") .HasColumnType("uuid") @@ -1513,6 +1527,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CommonCharTypeId") @@ -1523,11 +1538,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(1) @@ -1541,11 +1556,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(1) @@ -1568,15 +1583,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -1592,11 +1608,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.HasKey("Id"); @@ -1611,7 +1627,8 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.ContactMethod", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("ContactMethodType") .ValueGeneratedOnAdd() @@ -1632,19 +1649,19 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.HasKey("Id"); @@ -1659,15 +1676,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("CustomerOrgId") .HasColumnType("uuid") @@ -1687,11 +1705,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("Remark") .HasMaxLength(50) @@ -1727,15 +1745,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("CriticalValueTypeId") .HasColumnType("uuid") @@ -1755,11 +1774,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.HasKey("Id"); @@ -1777,15 +1796,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(40) @@ -1801,11 +1821,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("ParentId") .HasColumnType("uuid") @@ -1833,6 +1853,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength() .HasComment("单位ID"); @@ -1856,11 +1877,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(50) @@ -1901,11 +1922,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("OrgTypeId") .HasColumnType("uuid") @@ -1974,7 +1995,8 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgCharge", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("ChargeFlag") .HasMaxLength(1) @@ -1984,11 +2006,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("CustomerOrgRegisterId") .HasColumnType("uuid") @@ -1997,11 +2019,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("Payer") .HasMaxLength(50) @@ -2026,15 +2048,16 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBack", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("CustomerOrgChargeId") .HasColumnType("uuid") @@ -2043,11 +2066,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SettleAccountId") .HasColumnType("uuid") @@ -2095,7 +2118,8 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargePay", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("ChargeMoney") .HasPrecision(10, 2) @@ -2105,19 +2129,19 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("PayModeId") .HasMaxLength(4) @@ -2139,6 +2163,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength() .HasComment("分组编号"); @@ -2156,11 +2181,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("CustomerOrgRegisterId") .HasColumnType("uuid") @@ -2199,11 +2224,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("MaritalStatusId") .HasMaxLength(1) @@ -2248,19 +2273,19 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("Price") .HasPrecision(10, 2) @@ -2281,7 +2306,8 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgRegister", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("BeginTime") .ValueGeneratedOnAdd() @@ -2292,11 +2318,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("CustomerOrgId") .HasColumnType("uuid") @@ -2317,11 +2343,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("MedicalTimes") .HasColumnType("smallint") @@ -2353,15 +2379,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -2375,11 +2402,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(20) @@ -2400,6 +2427,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CodePrefix") @@ -2409,11 +2437,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DepartmentTypeFlag") .HasMaxLength(1) @@ -2438,11 +2466,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("ParentId") .HasMaxLength(4) @@ -2474,6 +2502,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength() .HasComment("仪器类别编号"); @@ -2484,11 +2513,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -2503,11 +2532,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(20) @@ -2526,15 +2555,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DiagnosisLevelId") .HasColumnType("uuid") @@ -2579,11 +2609,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(100) @@ -2610,15 +2640,16 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.DiagnosisLevel", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(10) @@ -2631,11 +2662,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.HasKey("Id"); @@ -2646,15 +2677,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -2668,11 +2700,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.HasKey("Id"); @@ -2688,15 +2720,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -2710,11 +2743,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(20) @@ -2759,15 +2792,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -2781,11 +2815,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("ParentId") .HasColumnType("uuid") @@ -2810,15 +2844,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -2832,11 +2867,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(20) @@ -2853,7 +2888,8 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.FollowUpPlan", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("Content") .HasMaxLength(200) @@ -2863,11 +2899,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("CycleDays") .HasColumnType("smallint") @@ -2899,11 +2935,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("PerfomFlag") .HasMaxLength(1) @@ -2938,15 +2974,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -2960,11 +2997,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(20) @@ -2987,11 +3024,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(10) @@ -3004,11 +3041,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(10) @@ -3025,15 +3062,16 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.Grouping", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -3046,11 +3084,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("ModifiedDate") .HasColumnType("date") @@ -3075,15 +3113,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -3099,11 +3138,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(20) @@ -3121,6 +3160,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .HasComment("登记流水号"); b.Property("CertificateDate") @@ -3136,19 +3176,19 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("ServiceOrg") .HasMaxLength(50) @@ -3335,11 +3375,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("Description") .HasMaxLength(1000) @@ -3356,11 +3396,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("PatientRegisterNo") .HasMaxLength(12) @@ -3392,15 +3432,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -3414,11 +3455,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(20) @@ -3438,15 +3479,16 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.InvoiceOrg", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(50) @@ -3460,11 +3502,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(50) @@ -3485,6 +3527,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CalculationFunction") @@ -3495,11 +3538,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DefaultResult") .HasMaxLength(200) @@ -3579,11 +3622,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("Price") .HasPrecision(10, 2) @@ -3641,15 +3684,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(50) @@ -3663,11 +3707,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(50) @@ -3688,16 +3732,17 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength() .HasComment("结果匹配编号"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DiagnosisId") .HasColumnType("uuid") @@ -3720,11 +3765,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("Result") .HasMaxLength(100) @@ -3747,16 +3792,17 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength() .HasComment("结果模板编号"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DiagnosisId") .HasColumnType("uuid") @@ -3788,11 +3834,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("Result") .HasMaxLength(200) @@ -3826,15 +3872,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -3852,11 +3899,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.HasKey("Id"); @@ -3872,15 +3919,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -3893,11 +3941,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(20) @@ -3941,6 +3989,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CheckTypeFlag") @@ -3953,11 +4002,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -3985,11 +4034,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("MedicalReportTypeId") .HasColumnType("uuid") @@ -4032,15 +4081,16 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.LisRequest", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("IsPrint") .HasMaxLength(1) @@ -4056,11 +4106,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("LisRequestNo") .HasMaxLength(30) @@ -4124,11 +4174,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(10) @@ -4143,11 +4193,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(10) @@ -4169,16 +4219,17 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength() .HasComment("体检结论编号"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -4193,11 +4244,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("MedicalConclusionTypeId") .HasMaxLength(2) @@ -4230,11 +4281,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -4247,11 +4298,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.HasKey("Id"); @@ -4267,16 +4318,17 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength() .HasComment("套餐主档编号"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -4307,11 +4359,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("Price") .HasPrecision(10, 2) @@ -4367,15 +4419,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -4391,11 +4444,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(20) @@ -4413,16 +4466,17 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength() .HasComment("体检类别编号"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(50) @@ -4437,11 +4491,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(50) @@ -4475,11 +4529,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -4494,11 +4548,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(20) @@ -4520,16 +4574,17 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength() .HasComment("职业病检查类别编号"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -4538,11 +4593,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("OcCheckTypeName") .HasMaxLength(20) @@ -4565,7 +4620,8 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.OperateLog", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("ComputerName") .HasMaxLength(50) @@ -4574,19 +4630,19 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("OperateContent") .HasMaxLength(1) @@ -4665,7 +4721,8 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.Patient", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("Address") .HasMaxLength(100) @@ -4686,11 +4743,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(30) @@ -4712,11 +4769,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("MaritalStatusId") .HasMaxLength(1) @@ -4783,7 +4840,8 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalDisease", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("AbnormalTimes") .HasColumnType("integer") @@ -4799,11 +4857,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DiagnosisDate") .HasColumnType("date") @@ -4838,11 +4896,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("MenstrualHistory") .HasMaxLength(50) @@ -4952,7 +5010,8 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalHistory", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("BeginDate") .HasColumnType("date") @@ -4960,11 +5019,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("EndDate") .HasColumnType("date") @@ -4972,11 +5031,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("Org") .HasMaxLength(30) @@ -5037,6 +5096,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .HasComment("登记流水号"); b.Property("Age") @@ -5070,11 +5130,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("CustomerOrgGroupId") .HasColumnType("uuid") @@ -5172,11 +5232,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("MaritalStatusId") .ValueGeneratedOnAdd() @@ -5387,16 +5447,17 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength() .HasComment("人员类别编号"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(50) @@ -5411,11 +5472,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(50) @@ -5436,15 +5497,16 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.PhoneFollow", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("FollowContent") .HasMaxLength(200) @@ -5459,11 +5521,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("PatientRegisterId") .HasColumnType("uuid") @@ -5489,16 +5551,17 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength() .HasComment("毒害编号"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -5513,11 +5576,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("PoisonTypeId") .HasColumnType("uuid") @@ -5542,16 +5605,17 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength() .HasComment("毒害类别编号"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -5566,11 +5630,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(50) @@ -5588,18 +5652,19 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength() .HasComment("职务编号"); b.Property("CreationTime") .ValueGeneratedOnAdd() .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime") + .HasColumnName("creation_time") .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(50) @@ -5614,12 +5679,12 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime") + .HasColumnName("last_modification_time") .HasComment("最后修改日期"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId") + .HasColumnName("last_modifier_id") .HasComment("最后修改者"); b.Property("SimpleCode") @@ -5642,15 +5707,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(50) @@ -5670,11 +5736,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("Price") .HasPrecision(10, 2) @@ -5714,11 +5780,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DateString") .HasMaxLength(8) @@ -5729,11 +5795,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SerialNo") .HasMaxLength(20) @@ -5751,7 +5817,8 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.QueueRegister", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("CallTime") .HasColumnType("timestamp without time zone") @@ -5769,12 +5836,12 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .ValueGeneratedOnAdd() .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime") + .HasColumnName("creation_time") .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -5783,11 +5850,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("NoCompleteReason") .ValueGeneratedOnAdd() @@ -5821,6 +5888,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength() .HasComment("参考范围编号"); @@ -5838,11 +5906,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("CriticalRangeValue") .HasMaxLength(50) @@ -5865,11 +5933,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("LowerDiagnosisId") .HasColumnType("uuid") @@ -5907,6 +5975,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .HasComment("主键"); b.Property("Amount") @@ -5929,11 +5998,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("GroupPackageId") .HasColumnType("uuid") @@ -5947,11 +6016,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("LisRequestId") .HasColumnType("uuid") @@ -5992,7 +6061,8 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.RegisterCheck", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("AuditTime") .HasColumnType("timestamp without time zone") @@ -6036,11 +6106,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("CriticalValue") .HasMaxLength(100) @@ -6098,11 +6168,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("RegisterAsbitemId") .HasColumnType("uuid") @@ -6128,15 +6198,16 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckCriticalValue", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("CriticalValue") .HasMaxLength(100) @@ -6164,11 +6235,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("ProcessTypeFlag") .HasMaxLength(1) @@ -6213,11 +6284,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("CriticalRangeValue") .HasMaxLength(50) @@ -6233,11 +6304,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("ReferenceRangeValue") .ValueGeneratedOnAdd() @@ -6281,15 +6352,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .HasComment("检查图片编号"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayOrder") .ValueGeneratedOnAdd() @@ -6306,11 +6378,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("PictureFilename") .HasMaxLength(200) @@ -6336,15 +6408,16 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSuggestion", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -6353,11 +6426,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("RegisterCheckId") .HasColumnType("uuid") @@ -6382,15 +6455,16 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSummary", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -6399,11 +6473,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("RegisterCheckId") .HasColumnType("uuid") @@ -6436,18 +6510,18 @@ namespace Shentun.Peis.Migrations b.Property("Id") .HasMaxLength(16) .HasColumnType("character varying(16)") - .HasColumnName("Id") + .HasColumnName("id") .HasComment("主键Id"); b.Property("CreationTime") .ValueGeneratedOnAdd() .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime") + .HasColumnName("creation_time") .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(64) @@ -6460,16 +6534,16 @@ namespace Shentun.Peis.Migrations .HasMaxLength(1) .HasColumnType("character(1)") .HasDefaultValue('N') - .HasColumnName("isActive") + .HasColumnName("is_active") .HasComment("启用标志(N:禁用,Y:启用)"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.HasKey("Id"); @@ -6483,18 +6557,18 @@ namespace Shentun.Peis.Migrations b.Property("Id") .HasMaxLength(16) .HasColumnType("character varying(16)") - .HasColumnName("Id") + .HasColumnName("id") .HasComment("主键Id"); b.Property("CreationTime") .ValueGeneratedOnAdd() .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime") + .HasColumnName("creation_time") .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(64) @@ -6512,11 +6586,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("ReportId") .HasMaxLength(16) @@ -6538,18 +6612,18 @@ namespace Shentun.Peis.Migrations b.Property("Id") .HasMaxLength(16) .HasColumnType("character varying(16)") - .HasColumnName("Id") + .HasColumnName("id") .HasComment("主键Id"); b.Property("CreationTime") .ValueGeneratedOnAdd() .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime") + .HasColumnName("creation_time") .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DataSetJson") .HasColumnType("text") @@ -6580,11 +6654,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("ReportFormatId") .HasColumnType("character varying(16)") @@ -6618,7 +6692,7 @@ namespace Shentun.Peis.Migrations b.Property("Id") .HasMaxLength(16) .HasColumnType("character varying(16)") - .HasColumnName("Id") + .HasColumnName("id") .HasComment("主键Id"); b.Property("ComputerName") @@ -6630,20 +6704,20 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .ValueGeneratedOnAdd() .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime") + .HasColumnName("creation_time") .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("PrinterName") .HasMaxLength(64) @@ -6674,11 +6748,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DataInputBackgroundColor") .ValueGeneratedOnAdd() @@ -6711,11 +6785,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("ReportBackgroundColor") .ValueGeneratedOnAdd() @@ -6749,15 +6823,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DepartmentId") .HasColumnType("uuid") @@ -6794,11 +6869,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("RoomTypeFlag") .ValueGeneratedOnAdd() @@ -6830,6 +6905,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("ContainerColor") @@ -6850,11 +6926,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -6867,11 +6943,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(20) @@ -6892,15 +6968,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -6913,11 +6990,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SampleContainerId") .HasColumnType("uuid") @@ -6978,15 +7055,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -6999,11 +7077,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(20) @@ -7023,16 +7101,17 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength() .HasComment("编号"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DepartmentId") .HasColumnType("uuid") @@ -7052,11 +7131,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(20) @@ -7091,7 +7170,8 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.SettleAccount", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("CompletedBy") .HasMaxLength(16) @@ -7106,11 +7186,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("IsComplete") .HasMaxLength(1) @@ -7120,11 +7200,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.HasKey("Id"); @@ -7142,11 +7222,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(10) @@ -7159,11 +7239,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(10) @@ -7181,6 +7261,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("AgeLowerLimit") @@ -7197,11 +7278,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("CriticalRangeValue") .HasMaxLength(50) @@ -7217,11 +7298,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("LowerDiagnosisId") .HasColumnType("uuid") @@ -7267,11 +7348,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -7284,11 +7365,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(20) @@ -7308,7 +7389,8 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.SmsSend", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("Content") .HasMaxLength(200) @@ -7318,11 +7400,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("FollowUpPlanId") .HasColumnType("uuid") @@ -7337,11 +7419,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("MobileTelephone") .HasMaxLength(11) @@ -7378,6 +7460,7 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("Content") @@ -7388,11 +7471,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -7405,11 +7488,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(20) @@ -7433,15 +7516,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -7454,11 +7538,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(20) @@ -7476,15 +7560,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DiagnosisId") .HasColumnType("uuid") @@ -7498,11 +7583,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SuggestionContent") .HasMaxLength(200) @@ -7556,15 +7641,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -7577,11 +7663,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(20) @@ -7607,15 +7693,16 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionContent", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -7623,11 +7710,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SuggestionContent") .HasMaxLength(100) @@ -7652,15 +7739,16 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionHeader", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -7668,11 +7756,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("PatientRegisterId") .HasColumnType("uuid") @@ -7704,15 +7792,16 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.SumSummaryContent", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -7720,11 +7809,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SumSummaryHeaderId") .HasColumnType("uuid") @@ -7749,15 +7838,16 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.SumSummaryHeader", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -7765,11 +7855,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("PatientRegisterId") .HasColumnType("uuid") @@ -7801,16 +7891,17 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength() .HasComment("症状编号"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -7825,11 +7916,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(20) @@ -7846,15 +7937,16 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.Sysdiagram", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("Definition") .HasColumnType("bytea") @@ -7867,11 +7959,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("PrincipalId") .HasColumnType("uuid") @@ -7900,11 +7992,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(100) @@ -7918,11 +8010,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("Remark") .HasMaxLength(500) @@ -7965,11 +8057,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(100) @@ -7982,11 +8074,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("ParentId") .HasMaxLength(100) @@ -8022,19 +8114,19 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("ParmValue") .HasMaxLength(100) @@ -8093,16 +8185,17 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength() .HasComment("职称类别编号"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -8117,11 +8210,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(20) @@ -8143,15 +8236,16 @@ namespace Shentun.Peis.Migrations { b.Property("Id") .HasColumnType("uuid") + .HasColumnName("id") .IsFixedLength(); b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DisplayName") .HasMaxLength(20) @@ -8164,11 +8258,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("SimpleCode") .HasMaxLength(20) @@ -8185,7 +8279,8 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.User", b => { b.Property("Id") - .HasColumnType("uuid"); + .HasColumnType("uuid") + .HasColumnName("id"); b.Property("Address") .HasMaxLength(50) @@ -8194,11 +8289,11 @@ namespace Shentun.Peis.Migrations b.Property("CreationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("CreationTime"); + .HasColumnName("creation_time"); b.Property("CreatorId") .HasColumnType("uuid") - .HasColumnName("CreatorId"); + .HasColumnName("creator_id"); b.Property("DepartmentId") .HasColumnType("uuid") @@ -8222,11 +8317,11 @@ namespace Shentun.Peis.Migrations b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") - .HasColumnName("LastModificationTime"); + .HasColumnName("last_modification_time"); b.Property("LastModifierId") .HasColumnType("uuid") - .HasColumnName("LastModifierId"); + .HasColumnName("last_modifier_id"); b.Property("LockScreenTimeInterval") .HasColumnType("integer")