From 711a4436485fbeb334502496646c83737c409a7c Mon Sep 17 00:00:00 2001 From: wxd <123@qq.com> Date: Thu, 14 Nov 2024 16:29:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WebPeisDbContextModelSnapshot.cs | 1416 ++++++++++++++--- 1 file changed, 1232 insertions(+), 184 deletions(-) diff --git a/src/Shentun.WebPeis.EntityFrameworkCore/Migrations/WebPeisDbContextModelSnapshot.cs b/src/Shentun.WebPeis.EntityFrameworkCore/Migrations/WebPeisDbContextModelSnapshot.cs index e1e9f09..9bc122d 100644 --- a/src/Shentun.WebPeis.EntityFrameworkCore/Migrations/WebPeisDbContextModelSnapshot.cs +++ b/src/Shentun.WebPeis.EntityFrameworkCore/Migrations/WebPeisDbContextModelSnapshot.cs @@ -22,12 +22,72 @@ namespace Shentun.WebPeis.Migrations NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + modelBuilder.Entity("Shentun.WebPeis.Models.AppOrganizationUnit", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("Code") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("DisplayName") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("display_name"); + + b.Property("ExtraProperties") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("text") + .HasColumnName("extra_properties"); + + b.Property("IsMedicalCenter") + .ValueGeneratedOnUpdateSometimes() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_medical_center"); + + b.Property("ParentId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("uuid") + .HasColumnName("parent_id"); + + b.Property("TenantId") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("uuid") + .HasColumnName("tenant_id"); + + b.HasKey("Id") + .HasName("pk_abp_organization_units"); + + b.ToTable("abp_organization_units", (string)null); + }); + modelBuilder.Entity("Shentun.WebPeis.Models.AppointPatientRegister", b => { b.Property("AppointPatientRegisterId") .HasColumnType("uuid") .HasColumnName("appoint_patient_register_id"); + b.Property("AppointDate") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp(6) without time zone") + .HasColumnName("appoint_date") + .HasDefaultValueSql("date(timezone('UTC-8'::text, now()))"); + b.Property("CompleteFlag") .ValueGeneratedOnAdd() .HasMaxLength(1) @@ -44,7 +104,7 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); @@ -60,11 +120,24 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("uuid") .HasColumnName("customer_org_register_id"); - b.Property("LastModificationTime") + b.Property("Height") + .HasPrecision(4, 1) + .HasColumnType("numeric(4,1)") + .HasColumnName("height") + .HasComment("身高"); + + b.Property("IsCharge") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_charge") + .HasDefaultValueSql("'N'::bpchar"); + + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); @@ -76,21 +149,32 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("uuid") .HasColumnName("medical_package_id"); - b.Property("MedicalStartDate") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp(6) without time zone") - .HasColumnName("medical_start_date") - .HasDefaultValueSql("date(timezone('UTC-8'::text, now()))"); + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); b.Property("PersonId") .HasColumnType("uuid") .HasColumnName("person_id"); + b.Property("PregnantFlag") + .ValueGeneratedOnAdd() + .HasColumnType("character(1)") + .HasColumnName("pregnant_flag") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("备孕标志"); + b.Property("Remark") .HasMaxLength(200) .HasColumnType("character varying(200)") .HasColumnName("remark"); + b.Property("Weight") + .HasPrecision(5, 2) + .HasColumnType("numeric(5,2)") + .HasColumnName("weight") + .HasComment("体重"); + b.HasKey("AppointPatientRegisterId") .HasName("appoint_patient_register_pkey"); @@ -134,7 +218,7 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); @@ -145,11 +229,11 @@ namespace Shentun.WebPeis.Migrations .HasColumnName("is_charge") .HasDefaultValueSql("'N'::bpchar"); - b.Property("LastModificationTime") + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); @@ -182,16 +266,17 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("uuid") .HasColumnName("appoint_schedule_id"); - b.Property("AppointDate") + b.Property("AppointDate") .HasColumnType("timestamp(0) without time zone") .HasColumnName("appoint_date"); b.Property("ConcurrencyStamp") + .IsRequired() .HasMaxLength(40) .HasColumnType("character varying(40)") .HasColumnName("concurrency_stamp"); - b.Property("CreationTime") + b.Property("CreationTime") .HasColumnType("timestamp without time zone") .HasColumnName("creation_time"); @@ -199,6 +284,10 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("uuid") .HasColumnName("creator_id"); + b.Property("IsWork") + .HasColumnType("character(1)") + .HasColumnName("is_work"); + b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") .HasColumnName("last_modification_time"); @@ -207,9 +296,13 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("uuid") .HasColumnName("last_modifier_id"); - b.Property("NumberLimit") + b.Property("MedicalCenterId") + .HasColumnType("uuid") + .HasColumnName("medical_center_id"); + + b.Property("SingleNumberLimit") .HasColumnType("integer") - .HasColumnName("number_limit"); + .HasColumnName("single_number_limit"); b.HasKey("AppointScheduleId") .HasName("appoint_schedule_pkey"); @@ -231,7 +324,7 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("character varying(40)") .HasColumnName("concurrency_stamp"); - b.Property("CreationTime") + b.Property("CreationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); @@ -239,6 +332,10 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("uuid") .HasColumnName("creator_id"); + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id"); + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); @@ -271,20 +368,12 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("uuid") .HasColumnName("appoint_schedule_template_id"); - b.Property("AmStartTime") - .HasColumnType("time without time zone") - .HasColumnName("am_start_time"); - - b.Property("AmStopTime") - .HasColumnType("time without time zone") - .HasColumnName("am_stop_time"); - b.Property("ConcurrencyStamp") .HasMaxLength(40) .HasColumnType("character varying(40)") .HasColumnName("concurrency_stamp"); - b.Property("CreationTime") + b.Property("CreationTime") .HasColumnType("timestamp without time zone") .HasColumnName("creation_time"); @@ -292,10 +381,14 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("uuid") .HasColumnName("creator_id"); - b.Property("DisplayOrder") + b.Property("DisplayOrder") .HasColumnType("integer") .HasColumnName("display_order"); + b.Property("IsWork") + .HasColumnType("character(1)") + .HasColumnName("is_work"); + b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") .HasColumnName("last_modification_time"); @@ -304,19 +397,15 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("uuid") .HasColumnName("last_modifier_id"); - b.Property("NumberLimit") - .HasColumnType("integer") - .HasColumnName("number_limit"); - - b.Property("PmStartTime") - .HasColumnType("time without time zone") - .HasColumnName("pm_start_time"); + b.Property("MedicalCenterId") + .HasColumnType("uuid") + .HasColumnName("medical_center_id"); - b.Property("PmStopTime") - .HasColumnType("time without time zone") - .HasColumnName("pm_stop_time"); + b.Property("SingleNumberLimit") + .HasColumnType("integer") + .HasColumnName("single_number_limit"); - b.Property("WeekId") + b.Property("WeekId") .HasColumnType("integer") .HasColumnName("week_id"); @@ -329,17 +418,68 @@ namespace Shentun.WebPeis.Migrations b.ToTable("appoint_schedule_template", (string)null); }); + modelBuilder.Entity("Shentun.WebPeis.Models.AppointScheduleTemplateTime", b => + { + b.Property("AppointScheduleTemplateTimeId") + .HasColumnType("uuid") + .HasColumnName("appoint_schedule_template_time_id"); + + b.Property("AppointScheduleTemplateId") + .HasColumnType("uuid") + .HasColumnName("appoint_schedule_template_id"); + + b.Property("ConcurrencyStamp") + .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("NumberLimit") + .HasColumnType("integer") + .HasColumnName("number_limit"); + + b.Property("StartTime") + .HasColumnType("time without time zone") + .HasColumnName("start_time"); + + b.Property("StopTime") + .HasColumnType("time without time zone") + .HasColumnName("stop_time"); + + b.HasKey("AppointScheduleTemplateTimeId") + .HasName("appoint_schedule_template_time_pkey"); + + b.HasIndex("AppointScheduleTemplateId"); + + b.ToTable("appoint_schedule_template_time", (string)null); + }); + modelBuilder.Entity("Shentun.WebPeis.Models.AppointScheduleTime", b => { b.Property("AppointScheduleTimeId") .HasColumnType("uuid") .HasColumnName("appoint_schedule_time_id"); - b.Property("AppointNumber") + b.Property("AppointNumber") .HasColumnType("integer") .HasColumnName("appoint_number"); - b.Property("AppointScheduleId") + b.Property("AppointScheduleId") .HasColumnType("uuid") .HasColumnName("appoint_schedule_id"); @@ -348,7 +488,7 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("character varying(40)") .HasColumnName("concurrency_stamp"); - b.Property("CreationTime") + b.Property("CreationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); @@ -364,15 +504,15 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("uuid") .HasColumnName("last_modifier_id"); - b.Property("NumberLimit") + b.Property("NumberLimit") .HasColumnType("integer") .HasColumnName("number_limit"); - b.Property("StartTime") + b.Property("StartTime") .HasColumnType("time without time zone") .HasColumnName("start_time"); - b.Property("StopTime") + b.Property("StopTime") .HasColumnType("time without time zone") .HasColumnName("stop_time"); @@ -413,7 +553,7 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); @@ -437,6 +577,13 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("integer") .HasColumnName("display_order"); + b.Property("ForPregnantFlag") + .ValueGeneratedOnAdd() + .HasColumnType("character(1)") + .HasColumnName("for_pregnant_flag") + .HasDefaultValueSql("'A'") + .HasComment("备怀孕期间禁止检查"); + b.Property("ForSexId") .ValueGeneratedOnAdd() .HasMaxLength(1) @@ -487,14 +634,22 @@ namespace Shentun.WebPeis.Migrations .HasColumnName("item_type_id") .HasComment("项目类别"); - b.Property("LastModificationTime") + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); + b.Property("MaritalStatusId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用婚姻状况,0-未婚,1-已婚,A-全部"); + b.Property("Price") .HasPrecision(8, 2) .HasColumnType("numeric(8,2)") @@ -508,6 +663,7 @@ namespace Shentun.WebPeis.Migrations .HasComment("简称"); b.Property("SimpleCode") + .IsRequired() .HasMaxLength(30) .HasColumnType("character varying(30)") .HasColumnName("simple_code"); @@ -559,6 +715,60 @@ namespace Shentun.WebPeis.Migrations }); }); + modelBuilder.Entity("Shentun.WebPeis.Models.AsbitemRecommendLevel", b => + { + b.Property("AsbitemRecommendLevelId") + .HasColumnType("smallint") + .HasColumnName("asbitem_recommend_level_id"); + + b.Property("AsbitemRecommendLevelName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("asbitem_recommend_level_name"); + + b.Property("ConcurrencyStamp") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp(6) without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(999999) + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp(6) without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("AsbitemRecommendLevelId") + .HasName("pk_asbitem_recommend_level"); + + b.HasIndex(new[] { "AsbitemRecommendLevelName" }, "ix_asbitem_recommend_level") + .IsUnique(); + + b.ToTable("asbitem_recommend_level", (string)null); + }); + modelBuilder.Entity("Shentun.WebPeis.Models.Charge", b => { b.Property("ChargeId") @@ -898,7 +1108,7 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); @@ -924,11 +1134,11 @@ namespace Shentun.WebPeis.Migrations .HasDefaultValueSql("'Y'::bpchar") .HasComment("状态"); - b.Property("LastModificationTime") + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); @@ -1003,6 +1213,14 @@ namespace Shentun.WebPeis.Migrations .HasColumnName("age_upper_limit") .HasComment("适用年龄上限"); + b.Property("CanAddMoney") + .ValueGeneratedOnAdd() + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("can_add_money") + .HasDefaultValueSql("0") + .HasComment("可增加单位支付金额"); + b.Property("ConcurrencyStamp") .HasMaxLength(40) .HasColumnType("character varying(40)") @@ -1012,21 +1230,21 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); - b.Property("CustomerOrgRegisterId") - .HasColumnType("uuid") - .HasColumnName("customer_org_register_id"); - - b.Property("DisplayName") + b.Property("CustomerOrgGroupName") .IsRequired() .HasMaxLength(50) .HasColumnType("character varying(50)") - .HasColumnName("display_name") + .HasColumnName("customer_org_group_name") .HasComment("分组名称"); + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id"); + b.Property("DisplayOrder") .ValueGeneratedOnAdd() .HasColumnType("integer") @@ -1054,11 +1272,11 @@ namespace Shentun.WebPeis.Migrations .HasColumnName("job_title") .HasComment("适用职称"); - b.Property("LastModificationTime") + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); @@ -1069,9 +1287,11 @@ namespace Shentun.WebPeis.Migrations .HasComment("适用婚姻状况"); b.Property("Price") + .ValueGeneratedOnAdd() .HasPrecision(10, 2) .HasColumnType("numeric(10,2)") .HasColumnName("price") + .HasDefaultValueSql("0") .HasComment("价格"); b.Property("Remark") @@ -1119,15 +1339,15 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); - b.Property("LastModificationTime") + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); @@ -1170,7 +1390,7 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); @@ -1190,11 +1410,11 @@ namespace Shentun.WebPeis.Migrations .HasColumnName("is_complete") .HasComment("完成标志"); - b.Property("LastModificationTime") + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); @@ -1348,17 +1568,241 @@ namespace Shentun.WebPeis.Migrations b.ToTable("diagnosis_level", (string)null); }); + modelBuilder.Entity("Shentun.WebPeis.Models.DiseaseRisk", b => + { + b.Property("DiseaseRiskId") + .HasColumnType("uuid") + .HasColumnName("disease_risk_id"); + + b.Property("ConcurrencyStamp") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp(6) without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DiseaseRiskName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("disease_risk_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(999999) + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp(6) without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("DiseaseRiskId") + .HasName("pk_disease_risk"); + + b.HasIndex(new[] { "DiseaseRiskName" }, "ix_disease_risk") + .IsUnique(); + + b.ToTable("disease_risk", (string)null); + }); + + modelBuilder.Entity("Shentun.WebPeis.Models.DiseaseRiskLevel", b => + { + b.Property("DiseaseRiskLevelId") + .HasColumnType("uuid") + .HasColumnName("disease_risk_level_id"); + + b.Property("ConcurrencyStamp") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp(6) without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DiagnosisFunction") + .HasColumnType("text") + .HasColumnName("diagnosis_function"); + + b.Property("DiseaseRiskId") + .HasColumnType("uuid") + .HasColumnName("disease_risk_id"); + + b.Property("DiseaseRiskLevelName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("disease_risk_level_name"); + + b.Property("DiseaseRiskNormalLevelId") + .HasColumnType("smallint") + .HasColumnName("disease_risk_normal_level_id"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(999999) + .HasColumnName("display_order"); + + b.Property("Explain") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("explain"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp(6) without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("Suggestion") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("suggestion"); + + b.HasKey("DiseaseRiskLevelId") + .HasName("pk_disease_risk_level"); + + b.HasIndex("DiseaseRiskId"); + + b.ToTable("disease_risk_level", (string)null); + }); + + modelBuilder.Entity("Shentun.WebPeis.Models.DiseaseRiskLevelAsbitem", b => + { + b.Property("DiseaseRiskLevelId") + .HasColumnType("uuid") + .HasColumnName("disease_risk_level_id"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id"); + + b.Property("AsbitemRecommendLevelId") + .HasColumnType("smallint") + .HasColumnName("asbitem_recommend_level_id"); + + b.Property("ConcurrencyStamp") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp(6) without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp(6) without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("DiseaseRiskLevelId", "AsbitemId") + .HasName("disease_risk_level_asbitem_pkey"); + + b.ToTable("disease_risk_level_asbitem", (string)null); + }); + + modelBuilder.Entity("Shentun.WebPeis.Models.DiseaseRiskNormalLevel", b => + { + b.Property("DiseaseRiskNormalLevelId") + .HasColumnType("smallint") + .HasColumnName("disease_risk_normal_level_id"); + + b.Property("CreationTime") + .HasColumnType("timestamp(6) without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DiseaseRiskNormalLevelName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("disease_risk_normal_level_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(999999) + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp(6) without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("DiseaseRiskNormalLevelId") + .HasName("pk_disease_risk_normal_level"); + + b.HasIndex(new[] { "DiseaseRiskNormalLevelName" }, "ix_disease_disease_risk_normal_level") + .IsUnique(); + + b.ToTable("disease_risk_normal_level", (string)null); + }); + modelBuilder.Entity("Shentun.WebPeis.Models.DiseaseScreeningType", b => { b.Property("DiseaseScreeningTypeId") .HasColumnType("uuid") - .HasColumnName("question_type_id"); + .HasColumnName("disease_screening_type_id"); + + b.Property("ConcurrencyStamp") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); b.Property("CreationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); @@ -1374,11 +1818,11 @@ namespace Shentun.WebPeis.Migrations .HasDefaultValue(999999) .HasColumnName("display_order"); - b.Property("LastModificationTime") + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); @@ -1413,7 +1857,7 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); @@ -1426,11 +1870,11 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("character varying(10)") .HasColumnName("for_sex_name"); - b.Property("LastModificationTime") + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); @@ -1592,7 +2036,7 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); @@ -1617,11 +2061,11 @@ namespace Shentun.WebPeis.Migrations .HasColumnName("item_type_name") .HasComment("名称"); - b.Property("LastModificationTime") + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); @@ -1667,7 +2111,7 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); @@ -1692,11 +2136,11 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("character varying(30)") .HasColumnName("kinship_name"); - b.Property("LastModificationTime") + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); @@ -1728,7 +2172,7 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); @@ -1739,11 +2183,11 @@ namespace Shentun.WebPeis.Migrations .HasColumnName("display_order") .HasComment("显示顺序"); - b.Property("LastModificationTime") + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); @@ -1829,6 +2273,20 @@ namespace Shentun.WebPeis.Migrations .HasColumnName("medical_package_id") .HasComment("套餐主档编号"); + b.Property("AgeLowerLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_lower_limit") + .HasDefaultValueSql("0") + .HasComment("适用年龄下限"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("200") + .HasComment("适用年龄上限"); + b.Property("ConcurrencyStamp") .HasMaxLength(40) .HasColumnType("character varying(40)") @@ -1838,7 +2296,7 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); @@ -1863,19 +2321,32 @@ namespace Shentun.WebPeis.Migrations .HasColumnName("is_active") .HasComment("启用标志"); + b.Property("IsBasicRecommend") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_basic_recommend") + .HasDefaultValueSql("'N'::bpchar"); + b.Property("IsWebAppoint") .HasMaxLength(1) .HasColumnType("character(1)") .HasColumnName("is_web_appoint"); - b.Property("LastModificationTime") + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); + b.Property("MaritalStatusId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id"); + b.Property("MedicalPackageName") .IsRequired() .HasMaxLength(20) @@ -1972,7 +2443,7 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); @@ -1983,11 +2454,11 @@ namespace Shentun.WebPeis.Migrations .HasColumnName("display_order") .HasComment("显示顺序"); - b.Property("LastModificationTime") + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); @@ -2044,7 +2515,7 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); @@ -2060,11 +2531,11 @@ namespace Shentun.WebPeis.Migrations .HasColumnName("id_no") .HasComment("身份证号"); - b.Property("LastModificationTime") + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); @@ -2470,9 +2941,9 @@ namespace Shentun.WebPeis.Migrations modelBuilder.Entity("Shentun.WebPeis.Models.Person", b => { - b.Property("UserId") + b.Property("PersonId") .HasColumnType("uuid") - .HasColumnName("user_id"); + .HasColumnName("person_id"); b.Property("Address") .HasMaxLength(100) @@ -2510,6 +2981,12 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("uuid") .HasColumnName("creator_id"); + b.Property("Height") + .HasPrecision(4, 1) + .HasColumnType("numeric(4,1)") + .HasColumnName("height") + .HasComment("身高"); + b.Property("IdNo") .IsRequired() .HasMaxLength(18) @@ -2553,7 +3030,8 @@ namespace Shentun.WebPeis.Migrations b.Property("NationId") .IsRequired() - .HasColumnType("text") + .HasMaxLength(3) + .HasColumnType("character varying(3)") .HasColumnName("nation_id") .HasComment("民族编号"); @@ -2570,6 +3048,13 @@ namespace Shentun.WebPeis.Migrations .HasColumnName("postal_code") .HasComment("邮政编码"); + b.Property("PregnantFlag") + .ValueGeneratedOnAdd() + .HasColumnType("character(1)") + .HasColumnName("pregnant_flag") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("备孕标志"); + b.Property("SexId") .ValueGeneratedOnAdd() .HasMaxLength(1) @@ -2590,7 +3075,13 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("character varying(50)") .HasColumnName("wechat_open_id"); - b.HasKey("UserId") + b.Property("Weight") + .HasPrecision(5, 2) + .HasColumnType("numeric(5,2)") + .HasColumnName("weight") + .HasComment("体重"); + + b.HasKey("PersonId") .HasName("pk_patient"); b.HasIndex(new[] { "PersonNo" }, "IX_person_person_no") @@ -2607,13 +3098,13 @@ namespace Shentun.WebPeis.Migrations modelBuilder.Entity("Shentun.WebPeis.Models.PersonKinship", b => { - b.Property("UserId") + b.Property("PersonId") .HasColumnType("uuid") - .HasColumnName("user_id"); + .HasColumnName("person_id"); - b.Property("ParentUserId") + b.Property("ParentPersonId") .HasColumnType("uuid") - .HasColumnName("parent_user_id"); + .HasColumnName("parent_person_id"); b.Property("KinshipId") .HasMaxLength(2) @@ -2621,12 +3112,64 @@ namespace Shentun.WebPeis.Migrations .HasColumnName("kinship_id") .IsFixedLength(); - b.HasKey("UserId", "ParentUserId", "KinshipId") + b.HasKey("PersonId", "ParentPersonId", "KinshipId") .HasName("person_kinship_pkey"); b.ToTable("person_kinship", (string)null); }); + modelBuilder.Entity("Shentun.WebPeis.Models.PrimarykeyBuilder", b => + { + b.Property("PrimarykeyBuilderId") + .HasColumnType("text") + .HasColumnName("primarykey_builder_id") + .HasComment("编号"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DateString") + .HasMaxLength(8) + .HasColumnType("character varying(8)") + .HasColumnName("date_string") + .HasComment("日期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("SerialNo") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("serial_no") + .HasComment("序列号"); + + b.HasKey("PrimarykeyBuilderId") + .HasName("pk_primarykey_builder"); + + b.ToTable("primarykey_builder", null, t => + { + t.HasComment("主键产生器"); + }); + }); + modelBuilder.Entity("Shentun.WebPeis.Models.Question", b => { b.Property("QuestionId") @@ -2638,11 +3181,16 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("character(1)") .HasColumnName("answer_type"); + b.Property("ConcurrencyStamp") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + b.Property("CreationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); @@ -2657,28 +3205,52 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("character(1)") .HasColumnName("is_active"); - b.Property("LastModificationTime") + b.Property("IsShow") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_show") + .HasDefaultValueSql("'Y'::bpchar"); + + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id"); + + b.Property("PathCode") + .HasMaxLength(60) + .HasColumnType("character varying(60)") + .HasColumnName("path_code"); + b.Property("QuestionName") .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") + .HasMaxLength(100) + .HasColumnType("character varying(100)") .HasColumnName("question_name"); - b.Property("QuestionTypeId") - .HasColumnType("uuid") + b.Property("QuestionSubjectTypeId") + .IsRequired() + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("question_subject_type_id"); + + b.Property("QuestionTypeId") + .IsRequired() + .HasMaxLength(2) + .HasColumnType("character varying(2)") .HasColumnName("question_type_id"); b.Property("SimpleCode") .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") + .HasMaxLength(100) + .HasColumnType("character varying(100)") .HasColumnName("simple_code"); b.HasKey("QuestionId") @@ -2696,11 +3268,36 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("uuid") .HasColumnName("question_answer_id"); + b.Property("Aliases") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("aliases"); + + b.Property("AnswerResultType") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("answer_result_type"); + + b.Property("ChildAnswerTitle") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("child_answer_title"); + + b.Property("ChildAnswerType") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("child_answer_type"); + + b.Property("ConcurrencyStamp") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + b.Property("CreationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); @@ -2710,28 +3307,57 @@ namespace Shentun.WebPeis.Migrations .HasDefaultValue(999999) .HasColumnName("display_order"); - b.Property("LastModificationTime") + b.Property("HealthGuidance") + .HasMaxLength(300) + .HasColumnType("character varying(300)") + .HasColumnName("health_guidance"); + + b.Property("IsNone") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_none"); + + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); + b.Property("Overview") + .HasMaxLength(300) + .HasColumnType("character varying(300)") + .HasColumnName("overview"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id"); + + b.Property("PathCode") + .HasMaxLength(60) + .HasColumnType("character varying(60)") + .HasColumnName("path_code"); + b.Property("QuestionAnswerName") .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") + .HasMaxLength(100) + .HasColumnType("character varying(100)") .HasColumnName("question_answer_name"); b.Property("QuestionId") .HasColumnType("uuid") .HasColumnName("question_id"); + b.Property("Reason") + .HasMaxLength(300) + .HasColumnType("character varying(300)") + .HasColumnName("reason"); + b.Property("SimpleCode") .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") + .HasMaxLength(100) + .HasColumnType("character varying(100)") .HasColumnName("simple_code"); b.HasKey("QuestionAnswerId") @@ -2740,131 +3366,374 @@ namespace Shentun.WebPeis.Migrations b.ToTable("question_answer", (string)null); }); - modelBuilder.Entity("Shentun.WebPeis.Models.QuestionRegister", b => - { - b.Property("QuestionRegisterId") - .HasColumnType("uuid") - .HasColumnName("question_register_id"); + modelBuilder.Entity("Shentun.WebPeis.Models.QuestionAnswerAsbitem", b => + { + b.Property("QuestionAnswerId") + .HasColumnType("uuid") + .HasColumnName("question_answer_id"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id"); + + b.Property("AsbitemRecommendLevelId") + .HasColumnType("smallint") + .HasColumnName("asbitem_recommend_level_id"); + + b.Property("ConcurrencyStamp") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp(6) without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp(6) without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.HasKey("QuestionAnswerId", "AsbitemId", "AsbitemRecommendLevelId") + .HasName("question_answer_asbitem_pkey"); + + b.ToTable("question_answer_asbitem", (string)null); + }); + + modelBuilder.Entity("Shentun.WebPeis.Models.QuestionAnswerChild", b => + { + b.Property("QuestionAnswerChildId") + .HasColumnType("uuid") + .HasColumnName("question_answer_child_id"); + + b.Property("ConcurrencyStamp") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp(6) without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(999999) + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp(6) without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("QuestionAnswerChildName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("question_answer_child_name"); + + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("QuestionAnswerChildId") + .HasName("pk_question_answer_child"); + + b.HasIndex(new[] { "QuestionAnswerChildName" }, "ix_question_answer_child") + .IsUnique(); + + b.ToTable("question_answer_child", (string)null); + }); + + modelBuilder.Entity("Shentun.WebPeis.Models.QuestionAnswerRiskLevel", b => + { + b.Property("DiseaseRiskLevelId") + .HasColumnType("uuid") + .HasColumnName("disease_risk_level_id"); + + b.Property("QuestionAnswerId") + .HasColumnType("uuid") + .HasColumnName("question_answer_id"); + + b.Property("ConcurrencyStamp") + .HasColumnType("text") + .HasColumnName("concurrency_stamp"); + + b.HasKey("DiseaseRiskLevelId", "QuestionAnswerId") + .HasName("pk_question_answer_risk_level"); + + b.ToTable("question_answer_risk_level", null, t => + { + t.HasComment("答案对应的疾病风险级别"); + }); + }); + + modelBuilder.Entity("Shentun.WebPeis.Models.QuestionRegister", b => + { + b.Property("QuestionRegisterId") + .HasColumnType("uuid") + .HasColumnName("question_register_id"); + + b.Property("ConcurrencyStamp") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp(6) without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp(6) without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("PersonId") + .HasColumnType("uuid") + .HasColumnName("person_id"); + + b.HasKey("QuestionRegisterId") + .HasName("pk_question_register"); + + b.HasIndex(new[] { "PersonId" }, "IX_question_register_person_id"); + + b.ToTable("question_register", (string)null); + }); + + modelBuilder.Entity("Shentun.WebPeis.Models.QuestionRegisterAnswer", b => + { + b.Property("QuestionRegisterAnswerId") + .HasColumnType("uuid") + .HasColumnName("question_register_answer_id"); + + b.Property("ConcurrencyStamp") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("Content") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("content"); + + b.Property("CreationTime") + .HasColumnType("timestamp(6) without time zone") + .HasColumnName("creation_time"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("creator_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp(6) without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("QuestionAnswerId") + .HasColumnType("uuid") + .HasColumnName("question_answer_id"); + + b.Property("QuestionRegisterItemId") + .HasColumnType("uuid") + .HasColumnName("question_register_item_id"); + + b.HasKey("QuestionRegisterAnswerId") + .HasName("question_register_answer_pkey"); + + b.HasIndex(new[] { "QuestionAnswerId" }, "IX_question_register_answer_question_answer_id"); + + b.HasIndex(new[] { "QuestionRegisterItemId" }, "IX_question_register_answer_question_register_item_id"); + + b.ToTable("question_register_answer", (string)null); + }); + + modelBuilder.Entity("Shentun.WebPeis.Models.QuestionRegisterAnswerChild", b => + { + b.Property("QuestionRegisterAnswerChildId") + .HasColumnType("uuid") + .HasColumnName("question_register_answer_child_id"); + + b.Property("ConcurrencyStamp") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("Content") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("content"); b.Property("CreationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); - b.Property("LastModificationTime") + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); - b.Property("PersonId") + b.Property("QuestionRegisterAnswerId") .HasColumnType("uuid") - .HasColumnName("person_id"); + .HasColumnName("question_register_answer_id"); - b.HasKey("QuestionRegisterId") - .HasName("pk_question_register"); + b.HasKey("QuestionRegisterAnswerChildId") + .HasName("pk_question_register_answer_child"); - b.HasIndex("PersonId"); + b.HasIndex("QuestionRegisterAnswerId"); - b.ToTable("question_register", (string)null); + b.ToTable("question_register_answer_child", (string)null); }); - modelBuilder.Entity("Shentun.WebPeis.Models.QuestionRegisterAnswer", b => + modelBuilder.Entity("Shentun.WebPeis.Models.QuestionRegisterItem", b => { - b.Property("QuestionRegisterAnswerId") + b.Property("QuestionRegisterItemId") .HasColumnType("uuid") - .HasColumnName("question_register_answer_id"); + .HasColumnName("question_register_item_id"); + + b.Property("ConcurrencyStamp") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); b.Property("CreationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); - b.Property("LastModificationTime") + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); - b.Property("QuestionAnswerId") + b.Property("QuestionId") .HasColumnType("uuid") - .HasColumnName("question_answer_id"); + .HasColumnName("question_id"); - b.Property("QuestionRegisterItemId") + b.Property("QuestionRegisterId") .HasColumnType("uuid") - .HasColumnName("question_register_item_id"); + .HasColumnName("question_register_id"); - b.HasKey("QuestionRegisterAnswerId") - .HasName("question_register_answer_pkey"); + b.HasKey("QuestionRegisterItemId") + .HasName("pk_question_register_item"); - b.HasIndex("QuestionAnswerId"); + b.HasIndex(new[] { "QuestionId" }, "IX_question_register_item_question_id"); - b.HasIndex("QuestionRegisterItemId"); + b.HasIndex(new[] { "QuestionRegisterId" }, "IX_question_register_item_question_register_id"); - b.ToTable("question_register_answer", (string)null); + b.ToTable("question_register_item", (string)null); }); - modelBuilder.Entity("Shentun.WebPeis.Models.QuestionRegisterItem", b => + modelBuilder.Entity("Shentun.WebPeis.Models.QuestionSubjectType", b => { - b.Property("QuestionRegisterItemId") - .HasColumnType("uuid") - .HasColumnName("question_register_item_id"); + b.Property("QuestionSubjectTypeId") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("question_subject_type_id"); + + b.Property("ConcurrencyStamp") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); b.Property("CreationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); - b.Property("LastModificationTime") + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(999999) + .HasColumnName("display_order"); + + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); - b.Property("QuestionId") - .HasColumnType("uuid") - .HasColumnName("question_id"); - - b.Property("QuestionRegisterId") - .HasColumnType("uuid") - .HasColumnName("question_register_id"); + b.Property("QuestionSubjectTypeName") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("question_subject_type_name"); - b.HasKey("QuestionRegisterItemId") - .HasName("pk_question_register_item"); + b.Property("SimpleCode") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); - b.HasIndex("QuestionId"); + b.HasKey("QuestionSubjectTypeId") + .HasName("pk_question_subject_type"); - b.HasIndex("QuestionRegisterId"); + b.HasIndex(new[] { "QuestionSubjectTypeName" }, "ix_question_subject_type") + .IsUnique(); - b.ToTable("question_register_item", (string)null); + b.ToTable("question_subject_type", (string)null); }); modelBuilder.Entity("Shentun.WebPeis.Models.QuestionType", b => { - b.Property("QuestionTypeId") - .HasColumnType("uuid") + b.Property("QuestionTypeId") + .HasMaxLength(2) + .HasColumnType("character varying(2)") .HasColumnName("question_type_id"); + b.Property("ConcurrencyStamp") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + b.Property("CreationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); @@ -2874,11 +3743,11 @@ namespace Shentun.WebPeis.Migrations .HasDefaultValue(999999) .HasColumnName("display_order"); - b.Property("LastModificationTime") + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); @@ -2954,7 +3823,7 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); @@ -3010,11 +3879,11 @@ namespace Shentun.WebPeis.Migrations .HasColumnName("is_audit") .HasComment("是审核"); - b.Property("LastModificationTime") + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); @@ -3071,7 +3940,7 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); @@ -3083,11 +3952,11 @@ namespace Shentun.WebPeis.Migrations .HasDefaultValueSql("'N'::bpchar") .HasComment("是否已收费"); - b.Property("LastModificationTime") + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); @@ -3560,7 +4429,7 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); @@ -3571,11 +4440,11 @@ namespace Shentun.WebPeis.Migrations .HasColumnName("display_order") .HasComment("显示顺序"); - b.Property("LastModificationTime") + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); @@ -3900,7 +4769,7 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); @@ -3919,11 +4788,11 @@ namespace Shentun.WebPeis.Migrations .HasDefaultValueSql("'N'::bpchar") .HasComment("是否支持设置按体检中心设置参数值(Y 直接取公共参数,无法设置 N.可以设置多个参数)"); - b.Property("LastModificationTime") + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); @@ -4055,15 +4924,15 @@ namespace Shentun.WebPeis.Migrations .HasColumnType("timestamp(6) without time zone") .HasColumnName("creation_time"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnType("uuid") .HasColumnName("creator_id"); - b.Property("LastModificationTime") + b.Property("LastModificationTime") .HasColumnType("timestamp(6) without time zone") .HasColumnName("last_modification_time"); - b.Property("LastModifierId") + b.Property("LastModifierId") .HasColumnType("uuid") .HasColumnName("last_modifier_id"); @@ -4127,6 +4996,80 @@ namespace Shentun.WebPeis.Migrations }); }); + modelBuilder.Entity("Shentun.WebPeis.Models.ThirdInterface", b => + { + b.Property("ThirdInterfaceId") + .HasColumnType("uuid") + .HasColumnName("third_interface_id") + .IsFixedLength() + .HasComment("编号"); + + b.Property("ConcurrencyStamp") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("concurrency_stamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp(6) 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("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasComment("是否启用"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp(6) without time zone") + .HasColumnName("last_modification_time"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("last_modifier_id"); + + b.Property("MedicalCenterId") + .HasColumnType("uuid") + .HasColumnName("medical_center_id"); + + b.Property("ParmValue") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("parm_value"); + + b.Property("ThirdInterfaceName") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("third_interface_name") + .HasComment("名称"); + + b.Property("ThirdInterfaceType") + .IsRequired() + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("third_interface_type") + .HasComment("接口类型"); + + b.HasKey("ThirdInterfaceId") + .HasName("pk_third_interface"); + + b.ToTable("third_interface", null, t => + { + t.HasComment("第三方接口表"); + }); + }); + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Property("Id") @@ -5250,6 +6193,7 @@ namespace Shentun.WebPeis.Migrations b.Property("Code") .IsRequired() + .ValueGeneratedOnUpdateSometimes() .HasMaxLength(95) .HasColumnType("character varying(95)") .HasColumnName("code"); @@ -5257,6 +6201,7 @@ namespace Shentun.WebPeis.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() + .ValueGeneratedOnUpdateSometimes() .HasMaxLength(40) .HasColumnType("character varying(40)") .HasColumnName("concurrency_stamp"); @@ -5279,6 +6224,7 @@ namespace Shentun.WebPeis.Migrations b.Property("DisplayName") .IsRequired() + .ValueGeneratedOnUpdateSometimes() .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("display_name"); @@ -5289,6 +6235,7 @@ namespace Shentun.WebPeis.Migrations b.Property("ExtraProperties") .IsRequired() + .ValueGeneratedOnUpdateSometimes() .HasColumnType("text") .HasColumnName("extra_properties"); @@ -5298,6 +6245,12 @@ namespace Shentun.WebPeis.Migrations .HasDefaultValue(false) .HasColumnName("is_deleted"); + b.Property("IsMedicalCenter") + .ValueGeneratedOnUpdateSometimes() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_medical_center"); + b.Property("LastModificationTime") .HasColumnType("timestamp with time zone") .HasColumnName("last_modification_time"); @@ -5307,10 +6260,12 @@ namespace Shentun.WebPeis.Migrations .HasColumnName("last_modifier_id"); b.Property("ParentId") + .ValueGeneratedOnUpdateSometimes() .HasColumnType("uuid") .HasColumnName("parent_id"); b.Property("TenantId") + .ValueGeneratedOnUpdateSometimes() .HasColumnType("uuid") .HasColumnName("tenant_id"); @@ -6090,10 +7045,20 @@ namespace Shentun.WebPeis.Migrations b.ToTable("abp_tenant_connection_strings", (string)null); }); + modelBuilder.Entity("Shentun.WebPeis.Models.AppOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithOne() + .HasForeignKey("Shentun.WebPeis.Models.AppOrganizationUnit", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_abp_organization_units_abp_organization_units_id"); + }); + modelBuilder.Entity("Shentun.WebPeis.Models.AppointRegisterAsbitem", b => { b.HasOne("Shentun.WebPeis.Models.AppointPatientRegister", "AppointPatientRegister") - .WithMany() + .WithMany("AppointRegisterAsbitems") .HasForeignKey("AppointPatientRegisterId") .IsRequired() .HasConstraintName("fk_appoint_register_asbitem"); @@ -6101,11 +7066,25 @@ namespace Shentun.WebPeis.Migrations b.Navigation("AppointPatientRegister"); }); + modelBuilder.Entity("Shentun.WebPeis.Models.AppointScheduleTemplateTime", b => + { + b.HasOne("Shentun.WebPeis.Models.AppointScheduleTemplate", "AppointScheduleTemplate") + .WithMany("AppointScheduleTemplateTimes") + .HasForeignKey("AppointScheduleTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_appoint_schedule_template_time"); + + b.Navigation("AppointScheduleTemplate"); + }); + modelBuilder.Entity("Shentun.WebPeis.Models.AppointScheduleTime", b => { b.HasOne("Shentun.WebPeis.Models.AppointSchedule", "AppointSchedule") .WithMany("AppointScheduleTimes") .HasForeignKey("AppointScheduleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() .HasConstraintName("fk_appoint_schedule_time"); b.Navigation("AppointSchedule"); @@ -6262,8 +7241,9 @@ namespace Shentun.WebPeis.Migrations b.HasOne("Shentun.WebPeis.Models.CustomerOrg", "CustomerOrg") .WithMany("CustomerOrgRegisters") .HasForeignKey("CustomerOrgId") + .OnDelete(DeleteBehavior.Cascade) .IsRequired() - .HasConstraintName("fk_customer_org_register"); + .HasConstraintName("fk_customer_org_register_customer_org_customer_org_id"); b.Navigation("CustomerOrg"); }); @@ -6280,6 +7260,28 @@ namespace Shentun.WebPeis.Migrations b.Navigation("ItemType"); }); + modelBuilder.Entity("Shentun.WebPeis.Models.DiseaseRiskLevel", b => + { + b.HasOne("Shentun.WebPeis.Models.DiseaseRisk", "DiseaseRisk") + .WithMany("DiseaseRiskLevels") + .HasForeignKey("DiseaseRiskId") + .IsRequired() + .HasConstraintName("fk_disease_risk_level"); + + b.Navigation("DiseaseRisk"); + }); + + modelBuilder.Entity("Shentun.WebPeis.Models.DiseaseRiskLevelAsbitem", b => + { + b.HasOne("Shentun.WebPeis.Models.DiseaseRiskLevel", "DiseaseRiskLevel") + .WithMany("DiseaseRiskLevelAsbitems") + .HasForeignKey("DiseaseRiskLevelId") + .IsRequired() + .HasConstraintName("disease_risk_level_asbitem"); + + b.Navigation("DiseaseRiskLevel"); + }); + modelBuilder.Entity("Shentun.WebPeis.Models.Item", b => { b.HasOne("Shentun.WebPeis.Models.ItemType", "ItemType") @@ -6324,6 +7326,17 @@ namespace Shentun.WebPeis.Migrations b.Navigation("MaritalStatus"); }); + modelBuilder.Entity("Shentun.WebPeis.Models.QuestionAnswerAsbitem", b => + { + b.HasOne("Shentun.WebPeis.Models.QuestionAnswer", "QuestionAnswer") + .WithMany("QuestionAnswerAsbitems") + .HasForeignKey("QuestionAnswerId") + .IsRequired() + .HasConstraintName("question_answer_asbitem"); + + b.Navigation("QuestionAnswer"); + }); + modelBuilder.Entity("Shentun.WebPeis.Models.QuestionRegister", b => { b.HasOne("Shentun.WebPeis.Models.Person", "Person") @@ -6354,6 +7367,17 @@ namespace Shentun.WebPeis.Migrations b.Navigation("QuestionRegisterItem"); }); + modelBuilder.Entity("Shentun.WebPeis.Models.QuestionRegisterAnswerChild", b => + { + b.HasOne("Shentun.WebPeis.Models.QuestionRegisterAnswer", "QuestionRegisterAnswer") + .WithMany("QuestionRegisterAnswerChildren") + .HasForeignKey("QuestionRegisterAnswerId") + .IsRequired() + .HasConstraintName("fk_question_register_answer_child"); + + b.Navigation("QuestionRegisterAnswer"); + }); + modelBuilder.Entity("Shentun.WebPeis.Models.QuestionRegisterItem", b => { b.HasOne("Shentun.WebPeis.Models.Question", "Question") @@ -6676,6 +7700,8 @@ namespace Shentun.WebPeis.Migrations modelBuilder.Entity("Shentun.WebPeis.Models.AppointPatientRegister", b => { + b.Navigation("AppointRegisterAsbitems"); + b.Navigation("Charges"); }); @@ -6684,6 +7710,11 @@ namespace Shentun.WebPeis.Migrations b.Navigation("AppointScheduleTimes"); }); + modelBuilder.Entity("Shentun.WebPeis.Models.AppointScheduleTemplate", b => + { + b.Navigation("AppointScheduleTemplateTimes"); + }); + modelBuilder.Entity("Shentun.WebPeis.Models.Asbitem", b => { b.Navigation("AsbitemDetails"); @@ -6729,6 +7760,16 @@ namespace Shentun.WebPeis.Migrations b.Navigation("CustomerOrgGroups"); }); + modelBuilder.Entity("Shentun.WebPeis.Models.DiseaseRisk", b => + { + b.Navigation("DiseaseRiskLevels"); + }); + + modelBuilder.Entity("Shentun.WebPeis.Models.DiseaseRiskLevel", b => + { + b.Navigation("DiseaseRiskLevelAsbitems"); + }); + modelBuilder.Entity("Shentun.WebPeis.Models.Item", b => { b.Navigation("AsbitemDetails"); @@ -6774,6 +7815,8 @@ namespace Shentun.WebPeis.Migrations modelBuilder.Entity("Shentun.WebPeis.Models.QuestionAnswer", b => { + b.Navigation("QuestionAnswerAsbitems"); + b.Navigation("QuestionRegisterAnswers"); }); @@ -6782,6 +7825,11 @@ namespace Shentun.WebPeis.Migrations b.Navigation("QuestionRegisterItems"); }); + modelBuilder.Entity("Shentun.WebPeis.Models.QuestionRegisterAnswer", b => + { + b.Navigation("QuestionRegisterAnswerChildren"); + }); + modelBuilder.Entity("Shentun.WebPeis.Models.QuestionRegisterItem", b => { b.Navigation("QuestionRegisterAnswers");