//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using Shentun.WebPeis.EntityFrameworkCore;
#nullable disable
namespace Shentun.WebPeis.Migrations
{
[DbContext(typeof(WebPeisDbContext))]
partial class WebPeisDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Shentun.WebPeis.Models.AppOrganizationUnit", b =>
{
b.Property("Id")
.HasColumnType("uuid")
.HasColumnName("id");
b.Property("Code")
.IsRequired()
.ValueGeneratedOnUpdateSometimes()
.HasMaxLength(95)
.HasColumnType("character varying(95)")
.HasColumnName("code");
b.Property("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.ValueGeneratedOnUpdateSometimes()
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("concurrency_stamp");
b.Property("DisplayName")
.IsRequired()
.ValueGeneratedOnUpdateSometimes()
.HasMaxLength(128)
.HasColumnType("character varying(128)")
.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("ChargeFlag")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("charge_flag")
.HasDefaultValueSql("'0'::bpchar");
b.Property("CompleteFlag")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("complete_flag")
.HasDefaultValueSql("'0'::bpchar");
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("CustomerOrgGroupId")
.HasColumnType("uuid")
.HasColumnName("customer_org_group_id");
b.Property("CustomerOrgId")
.HasColumnType("uuid")
.HasColumnName("customer_org_id");
b.Property("CustomerOrgRegisterId")
.HasColumnType("uuid")
.HasColumnName("customer_org_register_id");
b.Property("Height")
.HasPrecision(4, 1)
.HasColumnType("numeric(4,1)")
.HasColumnName("height")
.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("MedicalPackageId")
.HasColumnType("uuid")
.HasColumnName("medical_package_id");
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");
b.HasIndex(new[] { "PersonId" }, "ix_appoint_patient_register_person");
b.ToTable("appoint_patient_register", (string)null);
});
modelBuilder.Entity("Shentun.WebPeis.Models.AppointRegisterAsbitem", b =>
{
b.Property("AppointRegisterAsbitemId")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("appoint_register_asbitem_id");
b.Property("Amount")
.ValueGeneratedOnAdd()
.HasColumnType("smallint")
.HasDefaultValue((short)1)
.HasColumnName("amount");
b.Property("AppointPatientRegisterId")
.HasColumnType("uuid")
.HasColumnName("appoint_patient_register_id");
b.Property("AsbitemId")
.HasColumnType("uuid")
.HasColumnName("asbitem_id");
b.Property("ChargePrice")
.HasPrecision(10, 2)
.HasColumnType("numeric(10,2)")
.HasColumnName("charge_price");
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("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")
.HasColumnType("uuid")
.HasColumnName("last_modifier_id");
b.Property("PayTypeFlag")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("pay_type_flag")
.HasDefaultValueSql("0");
b.Property("StandardPrice")
.HasPrecision(10, 2)
.HasColumnType("numeric(10,2)")
.HasColumnName("standard_price");
b.HasKey("AppointRegisterAsbitemId")
.HasName("appoint_register_asbitem_id");
b.HasIndex("AppointPatientRegisterId");
b.HasIndex(new[] { "AppointRegisterAsbitemId", "AsbitemId" }, "ix_appoint_register_asbitem")
.IsUnique();
b.ToTable("appoint_register_asbitem", (string)null);
});
modelBuilder.Entity("Shentun.WebPeis.Models.AppointSchedule", b =>
{
b.Property("AppointScheduleId")
.HasColumnType("uuid")
.HasColumnName("appoint_schedule_id");
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")
.HasColumnType("timestamp without time zone")
.HasColumnName("creation_time");
b.Property("CreatorId")
.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");
b.Property("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("last_modifier_id");
b.Property("MedicalCenterId")
.HasColumnType("uuid")
.HasColumnName("medical_center_id");
b.Property("SingleNumberLimit")
.HasColumnType("integer")
.HasColumnName("single_number_limit");
b.HasKey("AppointScheduleId")
.HasName("appoint_schedule_pkey");
b.HasIndex(new[] { "AppointDate" }, "ix_appoint_schedule")
.IsUnique();
b.ToTable("appoint_schedule", (string)null);
});
modelBuilder.Entity("Shentun.WebPeis.Models.AppointScheduleCustomerOrg", b =>
{
b.Property("AppointScheduleCustomerOrgId")
.HasColumnType("uuid")
.HasColumnName("appoint_schedule_customer_org_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("CustomerOrgId")
.HasColumnType("uuid")
.HasColumnName("customer_org_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("NumberLimit")
.HasColumnType("integer")
.HasColumnName("number_limit");
b.Property("StartDate")
.HasColumnType("timestamp without time zone")
.HasColumnName("start_date");
b.Property("StopDate")
.HasColumnType("timestamp without time zone")
.HasColumnName("stop_date");
b.HasKey("AppointScheduleCustomerOrgId")
.HasName("appoint_schedule_customer_org_pkey");
b.ToTable("appoint_schedule_customer_org", (string)null);
});
modelBuilder.Entity("Shentun.WebPeis.Models.AppointScheduleExcludeCustomerOrg", b =>
{
b.Property("AppointScheduleExcludeCustomerOrgId")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("appoint_schedule_exclude_customer_org_id");
b.Property("AppointScheduleId")
.HasColumnType("uuid")
.HasColumnName("appoint_schedule_id")
.HasComment("预约计划Id");
b.Property("ConcurrencyStamp")
.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("CustomerOrgId")
.HasColumnType("uuid")
.HasColumnName("customer_org_id")
.HasComment("单位ID");
b.Property("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("last_modification_time");
b.Property("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("last_modifier_id");
b.HasKey("AppointScheduleExcludeCustomerOrgId")
.HasName("appoint_schedule_exclude_customer_org_pkey");
b.ToTable("appoint_schedule_exclude_customer_org", (string)null);
});
modelBuilder.Entity("Shentun.WebPeis.Models.AppointScheduleTemplate", b =>
{
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("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");
b.Property("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("last_modifier_id");
b.Property("MedicalCenterId")
.HasColumnType("uuid")
.HasColumnName("medical_center_id");
b.Property("SingleNumberLimit")
.HasColumnType("integer")
.HasColumnName("single_number_limit");
b.Property("WeekId")
.HasColumnType("integer")
.HasColumnName("week_id");
b.HasKey("AppointScheduleTemplateId")
.HasName("appoint_schedule_template_pkey");
b.HasIndex(new[] { "WeekId" }, "ix_appoint_schedule_template")
.IsUnique();
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")
.HasColumnType("integer")
.HasColumnName("appoint_number");
b.Property("AppointScheduleId")
.HasColumnType("uuid")
.HasColumnName("appoint_schedule_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("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("AppointScheduleTimeId")
.HasName("appoint_schedule_time_pkey");
b.HasIndex("AppointScheduleId");
b.ToTable("appoint_schedule_time", (string)null);
});
modelBuilder.Entity("Shentun.WebPeis.Models.Asbitem", b =>
{
b.Property("AsbitemId")
.HasColumnType("uuid")
.HasColumnName("asbitem_id")
.HasComment("编号");
b.Property("AsbitemName")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)")
.HasColumnName("asbitem_name")
.HasComment("名称");
b.Property("ClinicalMeaning")
.HasMaxLength(500)
.HasColumnType("character varying(500)")
.HasColumnName("clinical_meaning")
.HasComment("临床意义");
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("DefaultResult")
.HasMaxLength(100)
.HasColumnType("character varying(100)")
.HasColumnName("default_result")
.HasComment("默认结果");
b.Property("DeviceTypeId")
.HasColumnType("uuid")
.HasColumnName("device_type_id")
.HasComment("仪器类别");
b.Property("DiseaseScreeningTypeId")
.HasColumnType("uuid")
.HasColumnName("disease_screening_type_id")
.HasComment("职业病类别");
b.Property("DisplayOrder")
.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)
.HasColumnType("character(1)")
.HasColumnName("for_sex_id")
.HasDefaultValueSql("'A'::bpchar")
.HasComment("适用性别,M-男,F-女,A-全部");
b.Property("IsActive")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_active")
.HasDefaultValueSql("'Y'::bpchar")
.HasComment("是启用");
b.Property("IsBeforeEat")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_before_eat")
.HasDefaultValueSql("'N'::bpchar")
.HasComment("餐前项目");
b.Property("IsCheck")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_check")
.HasDefaultValueSql("'Y'::bpchar")
.HasComment("是检查项目");
b.Property("IsPictureRotate")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_picture_rotate")
.HasDefaultValueSql("'N'::bpchar")
.HasComment("体检报告图片旋转90°");
b.Property("IsWebAppoint")
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_web_appoint");
b.Property("ItemTypeId")
.HasColumnType("uuid")
.HasColumnName("item_type_id")
.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("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)")
.HasColumnName("price")
.HasComment("价格");
b.Property("ShortName")
.HasMaxLength(20)
.HasColumnType("character varying(20)")
.HasColumnName("short_name")
.HasComment("简称");
b.Property("SimpleCode")
.IsRequired()
.HasMaxLength(30)
.HasColumnType("character varying(30)")
.HasColumnName("simple_code");
b.Property("Warn")
.HasMaxLength(100)
.HasColumnType("character varying(100)")
.HasColumnName("warn")
.HasComment("注意事项");
b.HasKey("AsbitemId")
.HasName("pk_asbitem");
b.HasIndex(new[] { "ItemTypeId" }, "IX_asbitem_item_type_id");
b.HasIndex(new[] { "AsbitemName" }, "ix_asbitem")
.IsUnique();
b.ToTable("asbitem", null, t =>
{
t.HasComment("组合项目");
});
});
modelBuilder.Entity("Shentun.WebPeis.Models.AsbitemDetail", b =>
{
b.Property("AsbitemId")
.HasColumnType("uuid")
.HasColumnName("asbitem_id");
b.Property("ItemId")
.HasColumnType("uuid")
.HasColumnName("item_id")
.HasComment("项目编码");
b.Property("ConcurrencyStamp")
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("concurrency_stamp");
b.HasKey("AsbitemId", "ItemId")
.HasName("pk_department_asbitem_detail");
b.HasIndex(new[] { "ItemId" }, "IX_asbitem_detail_item_id");
b.ToTable("asbitem_detail", null, t =>
{
t.HasComment("组合项目包含项目");
});
});
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")
.HasColumnType("uuid")
.HasColumnName("charge_id")
.HasComment("收据号");
b.Property("AppointPatientRegisterId")
.HasColumnType("uuid")
.HasColumnName("appoint_patient_register_id")
.HasComment("登记流水号");
b.Property("ChargeFlag")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("charge_flag")
.HasDefaultValueSql("0");
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("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(6) 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");
b.Property("SettleTime")
.HasColumnType("timestamp(6) without time zone")
.HasColumnName("settle_time");
b.HasKey("ChargeId")
.HasName("charge_pkey");
b.HasIndex("AppointPatientRegisterId");
b.ToTable("charge", null, t =>
{
t.HasComment("收费主档");
});
});
modelBuilder.Entity("Shentun.WebPeis.Models.ChargeAsbitem", b =>
{
b.Property("ChargeAsbitemId")
.HasColumnType("uuid")
.HasColumnName("charge_asbitem_id");
b.Property("Amount")
.HasColumnType("smallint")
.HasColumnName("amount");
b.Property("AppointRegisterAsbitemId")
.HasColumnType("uuid")
.HasColumnName("appoint_register_asbitem_id");
b.Property("AsbitemId")
.HasColumnType("uuid")
.HasColumnName("asbitem_id")
.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("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("ChargeAsbitemId")
.HasName("charge_asbitem_pkey");
b.HasIndex(new[] { "ChargeId", "AsbitemId" }, "ix_charge_asbitem")
.IsUnique();
b.ToTable("charge_asbitem", null, t =>
{
t.HasComment("收费包含组合项目");
});
});
modelBuilder.Entity("Shentun.WebPeis.Models.ChargeBack", b =>
{
b.Property("ChargeBackId")
.HasColumnType("uuid")
.HasColumnName("charge_back_id");
b.Property("ChargeId")
.HasColumnType("uuid")
.HasColumnName("charge_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("SettleAccountId")
.HasColumnType("uuid")
.HasColumnName("settle_account_id");
b.Property("SettleTime")
.HasColumnType("timestamp(6) without time zone")
.HasColumnName("settle_time");
b.HasKey("ChargeBackId")
.HasName("charge_back_pkey");
b.HasIndex("ChargeId");
b.ToTable("charge_back", (string)null);
});
modelBuilder.Entity("Shentun.WebPeis.Models.ChargeBackAsbitem", b =>
{
b.Property("ChargeBackAsbitemId")
.HasColumnType("uuid")
.HasColumnName("charge_bak_asbitem_id");
b.Property("Amount")
.HasColumnType("smallint")
.HasColumnName("amount");
b.Property("ChargeAsbitemId")
.HasColumnType("uuid")
.HasColumnName("charge_asbitem_id");
b.Property("ChargeBackId")
.HasColumnType("uuid")
.HasColumnName("charge_back_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("ChargeBackAsbitemId")
.HasName("pk_charge_back_asbitem");
b.HasIndex("ChargeAsbitemId");
b.HasIndex(new[] { "ChargeBackId", "ChargeAsbitemId" }, "IX_charge_bak_asbitem_asbitem_id")
.IsUnique();
b.ToTable("charge_back_asbitem", (string)null);
});
modelBuilder.Entity("Shentun.WebPeis.Models.ChargeBackPay", b =>
{
b.Property("ChargeBackPayId")
.HasColumnType("uuid")
.HasColumnName("charge_back_pay_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.Property("ChargeBackId")
.HasColumnType("uuid")
.HasColumnName("charge_back_id");
b.Property("ConcurrencyStamp")
.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("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("last_modification_time");
b.Property("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("last_modifier_id");
b.Property("PayModeId")
.IsRequired()
.HasMaxLength(4)
.HasColumnType("character varying(4)")
.HasColumnName("pay_mode_id")
.HasComment("支付方式ID");
b.HasKey("ChargeBackPayId")
.HasName("charge_back_pay_pkey");
b.HasIndex(new[] { "ChargeBackId", "PayModeId" }, "ix_charge_back_pay");
b.ToTable("charge_back_pay", null, t =>
{
t.HasComment("退费支付方式");
});
});
modelBuilder.Entity("Shentun.WebPeis.Models.ChargePay", b =>
{
b.Property("ChargePayId")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("charge_pay_id");
b.Property("CardBillId")
.HasColumnType("uuid")
.HasColumnName("card_bill_id")
.HasComment("会员卡ID");
b.Property("ChargeId")
.HasColumnType("uuid")
.HasColumnName("charge_id")
.HasComment("收据号");
b.Property("ChargeMoney")
.HasPrecision(10, 2)
.HasColumnType("numeric(10,2)")
.HasColumnName("charge_money")
.HasComment("金额");
b.Property("ConcurrencyStamp")
.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("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("last_modification_time");
b.Property("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("last_modifier_id");
b.Property("PayModeId")
.IsRequired()
.HasMaxLength(4)
.HasColumnType("character varying(4)")
.HasColumnName("pay_mode_id")
.HasComment("支付方式");
b.HasKey("ChargePayId")
.HasName("charge_pay_key");
b.HasIndex(new[] { "ChargeId", "PayModeId" }, "ix_charge_pay")
.IsUnique();
b.ToTable("charge_pay", null, t =>
{
t.HasComment("收费方式");
});
});
modelBuilder.Entity("Shentun.WebPeis.Models.CompanyIntroduction", b =>
{
b.Property("CompanyIntroductionId")
.HasColumnType("uuid")
.HasColumnName("company_introduction_id");
b.Property("ConcurrencyStamp")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("concurrency_stamp");
b.Property("Content")
.IsRequired()
.HasMaxLength(4000)
.HasColumnType("character varying(4000)")
.HasColumnName("content")
.HasComment("内容");
b.Property("ContentType")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("content_type")
.HasDefaultValueSql("'0'::bpchar")
.HasComment("内容类型 0-标题 1-段落内容");
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.HasKey("CompanyIntroductionId")
.HasName("pk_company_introduction");
b.ToTable("company_introduction", null, t =>
{
t.HasComment("企业介绍");
});
});
modelBuilder.Entity("Shentun.WebPeis.Models.CustomerOrg", b =>
{
b.Property("CustomerOrgId")
.HasColumnType("uuid")
.HasColumnName("customer_org_id")
.HasComment("单位ID");
b.Property("ConcurrencyStamp")
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("concurrency_stamp");
b.Property("CountryOrgCode")
.HasMaxLength(20)
.HasColumnType("character varying(20)")
.HasColumnName("country_org_code");
b.Property("CreationTime")
.HasColumnType("timestamp(6) without time zone")
.HasColumnName("creation_time");
b.Property("CreatorId")
.HasColumnType("uuid")
.HasColumnName("creator_id");
b.Property("CustomerOrgName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)")
.HasColumnName("customer_org_name")
.HasComment("单位名称");
b.Property("DisplayOrder")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValue(999999)
.HasColumnName("display_order")
.HasComment("显示顺序");
b.Property("IsActive")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_active")
.HasDefaultValueSql("'Y'::bpchar")
.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")
.HasComment("体检中心ID");
b.Property("ParentId")
.HasColumnType("uuid")
.HasColumnName("parent_id")
.HasComment("父编号");
b.Property("PathCode")
.IsRequired()
.HasMaxLength(60)
.HasColumnType("character varying(60)")
.HasColumnName("path_code")
.HasComment("路径编码");
b.Property("Remark")
.HasMaxLength(100)
.HasColumnType("character varying(100)")
.HasColumnName("remark")
.HasComment("备注");
b.Property("ShortName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)")
.HasColumnName("short_name")
.HasComment("简称");
b.Property("SimpleCode")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)")
.HasColumnName("simple_code")
.HasComment("拼音简码");
b.HasKey("CustomerOrgId")
.HasName("pk_customer_org");
b.HasIndex(new[] { "MedicalCenterId" }, "fki_fk_customer_org_organization_units");
b.HasIndex(new[] { "ParentId", "CustomerOrgName" }, "ix_org")
.IsUnique();
b.ToTable("customer_org", null, t =>
{
t.HasComment("团检单位设置");
});
});
modelBuilder.Entity("Shentun.WebPeis.Models.CustomerOrgGroup", b =>
{
b.Property("CustomerOrgGroupId")
.HasColumnType("uuid")
.HasColumnName("customer_org_group_id");
b.Property("AgeLowerLimit")
.ValueGeneratedOnAdd()
.HasColumnType("smallint")
.HasDefaultValue((short)0)
.HasColumnName("age_lower_limit")
.HasComment("适用年龄下限");
b.Property("AgeUpperLimit")
.ValueGeneratedOnAdd()
.HasColumnType("smallint")
.HasDefaultValue((short)200)
.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)")
.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("CustomerOrgGroupName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)")
.HasColumnName("customer_org_group_name")
.HasComment("分组名称");
b.Property("CustomerOrgRegisterId")
.HasColumnType("uuid")
.HasColumnName("customer_org_register_id");
b.Property("DisplayOrder")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValue(999999)
.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(6) 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")
.ValueGeneratedOnAdd()
.HasPrecision(10, 2)
.HasColumnType("numeric(10,2)")
.HasColumnName("price")
.HasDefaultValueSql("0")
.HasComment("价格");
b.Property("Remark")
.HasMaxLength(100)
.HasColumnType("character varying(100)")
.HasColumnName("remark")
.HasComment("备注");
b.HasKey("CustomerOrgGroupId")
.HasName("pk_customer_org_group");
b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_customer_org_group_register");
b.ToTable("customer_org_group", null, t =>
{
t.HasComment("团体分组主档");
});
});
modelBuilder.Entity("Shentun.WebPeis.Models.CustomerOrgGroupDetail", b =>
{
b.Property("CustomerOrgGroupId")
.HasColumnType("uuid")
.HasColumnName("customer_org_group_id")
.HasComment("分组编号");
b.Property("AsbitemId")
.HasColumnType("uuid")
.HasColumnName("asbitem_id")
.HasComment("组合项目编号");
b.Property("Amount")
.ValueGeneratedOnAdd()
.HasColumnType("smallint")
.HasDefaultValue((short)1)
.HasColumnName("amount")
.HasComment("数量");
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("Price")
.HasPrecision(10, 2)
.HasColumnType("numeric(10,2)")
.HasColumnName("price")
.HasComment("价格");
b.HasKey("CustomerOrgGroupId", "AsbitemId")
.HasName("pk_org_group_detail");
b.HasIndex(new[] { "AsbitemId" }, "IX_customer_org_group_detail_asbitem_id");
b.ToTable("customer_org_group_detail", null, t =>
{
t.HasComment("团检分组包含组合项目");
});
});
modelBuilder.Entity("Shentun.WebPeis.Models.CustomerOrgRegister", b =>
{
b.Property("CustomerOrgRegisterId")
.HasColumnType("uuid")
.HasColumnName("customer_org_register_id");
b.Property("BeginTime")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp(6) without time zone")
.HasColumnName("begin_time")
.HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)")
.HasComment("开始日期");
b.Property("ConcurrencyStamp")
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("concurrency_stamp");
b.Property