From 89eb10d9dc9a154d862b96563a336ed5a115ff0b Mon Sep 17 00:00:00 2001
From: wxd <123@qq.com>
Date: Fri, 27 Jun 2025 17:11:01 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
 src/Shentun.WebPeis.Domain/Models/PayOrder.cs |  158 +
 .../Configures/PayOrderConfigure.cs           |   43 +
 ...0250306031249_insert_pay_order.Designer.cs | 8357 +++++++++++++++++
 .../20250306031249_insert_pay_order.cs        |   60 +
 .../WebPeisDbContextModelSnapshot.cs          |  172 +
 5 files changed, 8790 insertions(+)
 create mode 100644 src/Shentun.WebPeis.Domain/Models/PayOrder.cs
 create mode 100644 src/Shentun.WebPeis.EntityFrameworkCore/Configures/PayOrderConfigure.cs
 create mode 100644 src/Shentun.WebPeis.EntityFrameworkCore/Migrations/20250306031249_insert_pay_order.Designer.cs
 create mode 100644 src/Shentun.WebPeis.EntityFrameworkCore/Migrations/20250306031249_insert_pay_order.cs
diff --git a/src/Shentun.WebPeis.Domain/Models/PayOrder.cs b/src/Shentun.WebPeis.Domain/Models/PayOrder.cs
new file mode 100644
index 0000000..3317060
--- /dev/null
+++ b/src/Shentun.WebPeis.Domain/Models/PayOrder.cs
@@ -0,0 +1,158 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities.Auditing;
+using Volo.Abp.Domain.Entities;
+using System.ComponentModel.DataAnnotations;
+
+namespace Shentun.WebPeis.Models
+{
+    /// 
+    /// 支付订单表
+    /// 
+    public partial class PayOrder : AuditedEntity, IHasConcurrencyStamp
+    {
+        /// 
+        /// 主键
+        /// 
+        public Guid PayOrderId { get; set; }
+
+
+        /// 
+        /// 支付订单号(日期时间+随机数,通过雪花算法生成)
+        /// 
+        [StringLength(50)]
+        public string PayOrderNo { get; set; }
+
+
+        /// 
+        /// 状态  0-未完成,1-已完成,2-已完成并已经形成收据
+        /// 
+        public char CompleteFlag { get; set; }
+
+
+        /// 
+        /// 收费状态 0-收费,1-退费
+        /// 
+        public char ChargeFlag { get; set; }
+
+        /// 
+        /// 退款状态 0-未退,1-部分退,2-全退
+        /// 
+        public char RefundFlag { get; set; }
+
+        /// 
+        /// 用户id
+        /// 
+        [StringLength(50)]
+        public string PatientId { get; set; }
+
+        /// 
+        /// 金额 ,收费是正数,退费是负数
+        /// 
+        public decimal Charges { get; set; }
+
+        /// 
+        /// 源自字典表的设置,固定编码,比如:01-现金,02-微信,03,支付宝,04-银行卡等
+        /// 
+        [StringLength(2)]
+        public string PayModeId { get; set; }
+
+
+        /// 
+        /// 收费订单ID,退费时存储对应的收费订单ID
+        /// 
+        public Guid? ChargePayOrderId { get; set; }
+
+        /// 
+        /// 支付接口ID,比如01-微信官方接口,02-支付宝官方接口,03-某某公司聚合支付接口
+        /// 
+        public string PayInterfaceId { get; set; }
+
+        /// 
+        /// 支付源标志,0-体检
+        /// 
+        public char PayOrderSourceFlag { get; set; }
+
+        /// 
+        /// APP类型,0-体检电脑版,2-手机APP,3-微信小程序,4-支付宝小程序。
+        /// 
+        public int ClientAppType { get; set; }
+
+        /// 
+        /// 0-主扫,1-被扫
+        /// 
+        public int ScanPayType { get; set; }
+
+        /// 
+        /// 第三方支付订单号
+        /// 
+        [StringLength(50)]
+        public string InterfacePayOrderNo { get; set; }
+
+        /// 
+        /// 最终支付订单号,比如第三方支付调用微信,这里指微信支付订单号
+        /// 
+        [StringLength(50)]
+        public string TargetPayOrderNo { get; set; }
+
+        /// 
+        /// 设备号
+        /// 
+        [StringLength(50)]
+        public string DeviceNo { get; set; }
+
+        /// 
+        /// 第三方支付凭证号,根据第三方接口自定义使用方式
+        /// 
+        [StringLength(50)]
+        public string InterfaceSerialNo { get; set; }
+
+
+        /// 
+        /// 第三方支付支付日期
+        /// 
+        public DateTime? InterfacePayDate { get; set; }
+
+
+        /// 
+        /// 第三方支付参考号,根据第三方接口自定义使用方式
+        /// 
+        [StringLength(50)]
+        public string InterfaceRefnumber { get; set; }
+
+        /// 
+        /// 第三方支付方式中文名,比如现金、微信,支付宝、建行卡、招商银行卡等
+        /// 
+        [StringLength(20)]
+        public string InterfacePayModeName { get; set; }
+
+
+        public string InterfaceSerialModeName { get; set; }
+
+
+        /// 
+        /// 锁住,默认值N,锁住的只能人工窗口生成收费和退费信息,不能自动生成收费和退费信息,主要用于人工窗口处理异常情况
+        /// 
+        public char IsLocked { get; set; }
+
+
+        /// 
+        /// 生成收据错误次数
+        /// 
+        public int ErrorCount { get; set; }
+
+
+        public string ConcurrencyStamp { get; set; }
+
+
+        public override object?[] GetKeys()
+        {
+            return [PayOrderId];
+        }
+
+
+    }
+}
diff --git a/src/Shentun.WebPeis.EntityFrameworkCore/Configures/PayOrderConfigure.cs b/src/Shentun.WebPeis.EntityFrameworkCore/Configures/PayOrderConfigure.cs
new file mode 100644
index 0000000..306f1b8
--- /dev/null
+++ b/src/Shentun.WebPeis.EntityFrameworkCore/Configures/PayOrderConfigure.cs
@@ -0,0 +1,43 @@
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Microsoft.EntityFrameworkCore;
+using Shentun.WebPeis.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Shentun.WebPeis.Configures
+{
+    internal class PayOrderConfigure : IEntityTypeConfiguration
+    {
+        public void Configure(EntityTypeBuilder entity)
+        {
+            entity.ToTable("pay_order");
+
+            entity.Property(e => e.PayOrderNo).IsRequired().HasComment("支付订单号(日期时间+随机数,通过雪花算法生成)");
+            entity.Property(e => e.CompleteFlag).IsRequired().HasComment("0-未完成,1-已完成,2-已完成并已经形成收据").HasDefaultValueSql("'0'");
+            entity.Property(e => e.ChargeFlag).IsRequired().HasComment("0-收费,1-退费").HasDefaultValueSql("'0'");
+            entity.Property(e => e.RefundFlag).IsRequired().HasComment("退款状态 0-未退,1-部分退,2-全退");
+            entity.Property(e => e.PatientId).IsRequired().HasComment("用户id");
+            entity.Property(e => e.Charges).IsRequired().HasComment("金额 ,收费是正数,退费是负数").HasPrecision(8, 2);
+            entity.Property(e => e.PayModeId).IsRequired().HasComment("源自字典表的设置,固定编码,比如:01-现金,02-微信,03,支付宝,04-银行卡等");
+            entity.Property(e => e.ChargePayOrderId).HasComment("收费订单ID,退费时存储对应的收费订单ID");
+            entity.Property(e => e.PayInterfaceId).IsRequired().HasComment("支付接口ID,比如01-微信官方接口,02-支付宝官方接口,03-某某公司聚合支付接口");
+            entity.Property(e => e.PayOrderSourceFlag).IsRequired().HasComment("支付源标志,0-体检");
+            entity.Property(e => e.ClientAppType).IsRequired().HasComment("APP类型,0-体检电脑版,2-手机APP,3-微信小程序,4-支付宝小程序。");
+            entity.Property(e => e.ScanPayType).IsRequired().HasComment(" 0-主扫,1-被扫").HasDefaultValueSql("'0'");
+            entity.Property(e => e.InterfacePayOrderNo).HasComment("第三方支付订单号");
+            entity.Property(e => e.TargetPayOrderNo).HasComment("最终支付订单号,比如第三方支付调用微信,这里指微信支付订单号");
+            entity.Property(e => e.DeviceNo).HasComment("设备号");
+            entity.Property(e => e.InterfaceSerialNo).HasComment("第三方支付凭证号,根据第三方接口自定义使用方式");
+            entity.Property(e => e.InterfacePayDate).HasComment("第三方支付支付日期");
+            entity.Property(e => e.InterfaceRefnumber).HasComment("第三方支付参考号,根据第三方接口自定义使用方式");
+            entity.Property(e => e.InterfacePayModeName).IsRequired().HasComment("第三方支付方式中文名,比如现金、微信,支付宝、建行卡、招商银行卡等");
+            entity.Property(e => e.IsLocked).HasComment("锁住,默认值N,锁住的只能人工窗口生成收费和退费信息,不能自动生成收费和退费信息,主要用于人工窗口处理异常情况");
+            entity.Property(e => e.ErrorCount).IsRequired().HasComment("生成收据错误次数").HasDefaultValue(0);
+           
+
+        }
+    }
+}
diff --git a/src/Shentun.WebPeis.EntityFrameworkCore/Migrations/20250306031249_insert_pay_order.Designer.cs b/src/Shentun.WebPeis.EntityFrameworkCore/Migrations/20250306031249_insert_pay_order.Designer.cs
new file mode 100644
index 0000000..6874962
--- /dev/null
+++ b/src/Shentun.WebPeis.EntityFrameworkCore/Migrations/20250306031249_insert_pay_order.Designer.cs
@@ -0,0 +1,8357 @@
+// 
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+using Shentun.WebPeis.EntityFrameworkCore;
+
+#nullable disable
+
+namespace Shentun.WebPeis.Migrations
+{
+    [DbContext(typeof(WebPeisDbContext))]
+    [Migration("20250306031249_insert_pay_order")]
+    partial class insert_pay_order
+    {
+        /// 
+        protected override void BuildTargetModel(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(100)
+                        .HasColumnType("character varying(100)")
+                        .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.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(20)
+                        .HasColumnType("character varying(20)")
+                        .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("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")
+                        .HasComment("单位编号");
+
+                    b.Property("EndTime")
+                        .HasColumnType("timestamp(6) without time zone")
+                        .HasColumnName("end_time")
+                        .HasComment("结束日期");
+
+                    b.Property("IsComplete")
+                        .HasMaxLength(1)
+                        .HasColumnType("character(1)")
+                        .HasColumnName("is_complete")
+                        .HasComment("完成标志");
+
+                    b.Property("IsQuestion")
+                        .ValueGeneratedOnAdd()
+                        .HasMaxLength(1)
+                        .HasColumnType("character(1)")
+                        .HasColumnName("is_question")
+                        .HasDefaultValueSql("'N'::bpchar")
+                        .HasComment("是否需要填写问卷才能看报告");
+
+                    b.Property("LastModificationTime")
+                        .HasColumnType("timestamp(6) without time zone")
+                        .HasColumnName("last_modification_time");
+
+                    b.Property