From 44877f066e83e53f3c13f70569b688a33bc8ceef Mon Sep 17 00:00:00 2001
From: wxd <123@qq.com>
Date: Fri, 15 Nov 2024 17:40:32 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E8=AE=A2=E5=8D=95=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../appsettings.json | 2 +-
.../Models/WeChatOrder.cs | 87 +
.../Models/WeChatOrderRefund.cs | 98 +
.../Configures/WeChatOrderConfigure.cs | 30 +
.../Configures/WeChatOrderRefundConfigure.cs | 30 +
.../EntityFrameworkCore/WebPeisDbContext.cs | 4 +
...0241115093850_add_wechat_order.Designer.cs | 8090 +++++++++++++++++
.../20241115093850_add_wechat_order.cs | 89 +
.../WebPeisDbContextModelSnapshot.cs | 174 +
9 files changed, 8603 insertions(+), 1 deletion(-)
create mode 100644 src/Shentun.WebPeis.Domain/Models/WeChatOrder.cs
create mode 100644 src/Shentun.WebPeis.Domain/Models/WeChatOrderRefund.cs
create mode 100644 src/Shentun.WebPeis.EntityFrameworkCore/Configures/WeChatOrderConfigure.cs
create mode 100644 src/Shentun.WebPeis.EntityFrameworkCore/Configures/WeChatOrderRefundConfigure.cs
create mode 100644 src/Shentun.WebPeis.EntityFrameworkCore/Migrations/20241115093850_add_wechat_order.Designer.cs
create mode 100644 src/Shentun.WebPeis.EntityFrameworkCore/Migrations/20241115093850_add_wechat_order.cs
diff --git a/src/Shentun.WebPeis.DbMigrator/appsettings.json b/src/Shentun.WebPeis.DbMigrator/appsettings.json
index a2698c5..7e43b52 100644
--- a/src/Shentun.WebPeis.DbMigrator/appsettings.json
+++ b/src/Shentun.WebPeis.DbMigrator/appsettings.json
@@ -1,7 +1,7 @@
{
"AdminId": "3a12a8a6-beb9-fc29-b4e7-4acfb00d8370",
"ConnectionStrings": {
- "Default": "Host=62.156.10.86;Port=5432;Database=WebPeis0520;User ID=postgres;Password=st123"
+ "Default": "Host=140.143.162.39;Port=5432;Database=WebPeis;User ID=postgres;Password=shentun123"
},
"Redis": {
"Configuration": "127.0.0.1"
diff --git a/src/Shentun.WebPeis.Domain/Models/WeChatOrder.cs b/src/Shentun.WebPeis.Domain/Models/WeChatOrder.cs
new file mode 100644
index 0000000..de4ab3f
--- /dev/null
+++ b/src/Shentun.WebPeis.Domain/Models/WeChatOrder.cs
@@ -0,0 +1,87 @@
+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 WeChatOrder : AuditedEntity, IHasConcurrencyStamp
+ {
+ ///
+ /// 主键
+ ///
+ public Guid WeChatOrderId { get; set; }
+
+ ///
+ /// 预约id
+ ///
+ public Guid AppointPatientRegisterId { get; set; }
+
+ ///
+ /// openid
+ ///
+ [StringLength(50)]
+ public string Openid { get; set; }
+
+ ///
+ /// 订单号
+ ///
+ [StringLength(50)]
+ public string OutTradeNo { get; set; }
+
+ ///
+ /// 商户号
+ ///
+ [StringLength(20)]
+ public string Mchid { get; set; }
+
+ ///
+ /// appid
+ ///
+ [StringLength(20)]
+ public string Appid { get; set; }
+
+ ///
+ /// 订单金额
+ ///
+ public int OrderMoney { get; set; }
+
+ //
+ ///
+ /// 微信系统生成的订单号
+ ///
+ [StringLength(50)]
+ public string TransactionId { get; set; }
+
+ ///
+ /// 状态
+ /// 交易状态,枚举值:
+ /// SUCCESS:支付成功
+ /// REFUND:转入退款
+ /// NOTPAY:未支付
+ /// CLOSED:已关闭
+ /// REVOKED:已撤销(付款码支付)
+ /// USERPAYING:用户支付中(付款码支付)
+ /// PAYERROR:支付失败(其他原因,如银行返回失败)
+ ///
+ [StringLength(20)]
+ public string Status { get; set; }
+
+ public string ConcurrencyStamp { get; set; }
+
+
+ public override object?[] GetKeys()
+ {
+ return [WeChatOrderId];
+ }
+
+
+ }
+}
diff --git a/src/Shentun.WebPeis.Domain/Models/WeChatOrderRefund.cs b/src/Shentun.WebPeis.Domain/Models/WeChatOrderRefund.cs
new file mode 100644
index 0000000..bf1c007
--- /dev/null
+++ b/src/Shentun.WebPeis.Domain/Models/WeChatOrderRefund.cs
@@ -0,0 +1,98 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities.Auditing;
+using Volo.Abp.Domain.Entities;
+
+namespace Shentun.WebPeis.Models
+{
+ ///
+ /// 微信订单表
+ ///
+ public partial class WeChatOrderRefund : AuditedEntity, IHasConcurrencyStamp
+ {
+ ///
+ /// 主键
+ ///
+ public Guid WeChatOrderRefundId { get; set; }
+
+
+ ///
+ /// 微信订单表Id
+ ///
+ public Guid WeChatOrderId { get; set; }
+
+ ///
+ /// 退款申请单号
+ ///
+ [StringLength(50)]
+ public string OutRefundNo { get; set; }
+
+
+ ///
+ /// 退款金额
+ ///
+ public int RefundrMoney { get; set; }
+
+ ///
+ /// 微信系统生成的退款号
+ ///
+ [StringLength(50)]
+ public string RefundId { get; set; }
+
+
+ ///
+ /// 退款渠道
+ /// ORIGINAL: 原路退款
+ /// BALANCE: 退回到余额
+ /// OTHER_BALANCE: 原账户异常退到其他余额账户
+ /// OTHER_BANKCARD: 原银行卡异常退到其他银行卡
+ ///
+ [StringLength(50)]
+ public string Channel { get; set; }
+
+ ///
+ /// 退款入账账户 取当前退款单的退款入账方,有以下几种情况:
+ /// 1)退回银行卡:{银行名称}{卡类型}{卡尾号}
+ /// 2)退回支付用户零钱:支付用户零钱
+ /// 3)退还商户:商户基本账户商户结算银行账户
+ /// 4)退回支付用户零钱通:支付用户零钱通
+ /// 5)退回支付用户银行电子账户:支付用户银行电子账户
+ /// 6)退回支付用户零花钱:支付用户零花钱
+ /// 7)退回用户经营账户:用户经营账户
+ /// 8)退回支付用户来华零钱包:支付用户来华零钱包
+ /// 9)退回企业支付商户:企业支付商户
+ ///
+ [StringLength(100)]
+ public string UserReceivedAccount { get; set; }
+
+
+
+ ///
+ /// 退款状态
+ /// SUCCESS: 退款成功
+ /// CLOSED: 退款关闭
+ /// PROCESSING: 退款处理中
+ /// ABNORMAL: 退款异常
+ ///
+ [StringLength(50)]
+ public string Status { get; set; }
+
+
+
+ ///
+ /// 完成时间
+ ///
+ public DateTime? SuccessTime { get; set; }
+
+ public string ConcurrencyStamp { get; set; }
+
+ public override object?[] GetKeys()
+ {
+ return [WeChatOrderRefundId];
+ }
+ }
+}
diff --git a/src/Shentun.WebPeis.EntityFrameworkCore/Configures/WeChatOrderConfigure.cs b/src/Shentun.WebPeis.EntityFrameworkCore/Configures/WeChatOrderConfigure.cs
new file mode 100644
index 0000000..143fedc
--- /dev/null
+++ b/src/Shentun.WebPeis.EntityFrameworkCore/Configures/WeChatOrderConfigure.cs
@@ -0,0 +1,30 @@
+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 WeChatOrderConfigure : IEntityTypeConfiguration
+ {
+ public void Configure(EntityTypeBuilder entity)
+ {
+ entity.ToTable("wechat_order");
+
+ entity.HasIndex(e => e.OutTradeNo, "ix_wechat_order_out_trade_no").IsUnique();
+
+ entity.Property(e => e.AppointPatientRegisterId).HasComment("预约id");
+ entity.Property(e => e.Openid).HasComment("Openid");
+ entity.Property(e => e.OutTradeNo).HasComment("订单号");
+ entity.Property(e => e.Mchid).HasComment("商户号");
+ entity.Property(e => e.Appid).HasComment("appid");
+ entity.Property(e => e.OrderMoney).HasComment("订单金额");
+ entity.Property(e => e.TransactionId).HasComment("微信系统生成的订单号").IsRequired(false);
+ entity.Property(e => e.Status).HasComment("交易状态");
+ }
+ }
+}
diff --git a/src/Shentun.WebPeis.EntityFrameworkCore/Configures/WeChatOrderRefundConfigure.cs b/src/Shentun.WebPeis.EntityFrameworkCore/Configures/WeChatOrderRefundConfigure.cs
new file mode 100644
index 0000000..ea9f940
--- /dev/null
+++ b/src/Shentun.WebPeis.EntityFrameworkCore/Configures/WeChatOrderRefundConfigure.cs
@@ -0,0 +1,30 @@
+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 WeChatOrderRefundConfigure : IEntityTypeConfiguration
+ {
+ public void Configure(EntityTypeBuilder entity)
+ {
+ entity.ToTable("wechat_order_refund");
+
+ entity.HasIndex(e => e.OutRefundNo, "ix_wechat_order_refund_out_refund_no").IsUnique();
+
+ entity.Property(e => e.WeChatOrderId).HasComment("微信订单表Id");
+ entity.Property(e => e.OutRefundNo).HasComment("退款申请单号");
+ entity.Property(e => e.RefundrMoney).HasComment("退款金额(分)");
+ entity.Property(e => e.RefundId).HasComment("微信系统生成的退款号").IsRequired(false);
+ entity.Property(e => e.Channel).HasComment("退款渠道");
+ entity.Property(e => e.UserReceivedAccount).HasComment("退款入账账户");
+ entity.Property(e => e.SuccessTime).HasComment("完成时间").IsRequired(false);
+ entity.Property(e => e.Status).HasComment("交易状态");
+ }
+ }
+}
diff --git a/src/Shentun.WebPeis.EntityFrameworkCore/EntityFrameworkCore/WebPeisDbContext.cs b/src/Shentun.WebPeis.EntityFrameworkCore/EntityFrameworkCore/WebPeisDbContext.cs
index 3f1b789..9cdc73a 100644
--- a/src/Shentun.WebPeis.EntityFrameworkCore/EntityFrameworkCore/WebPeisDbContext.cs
+++ b/src/Shentun.WebPeis.EntityFrameworkCore/EntityFrameworkCore/WebPeisDbContext.cs
@@ -242,6 +242,10 @@ public partial class WebPeisDbContext : AbpDbContext,
public virtual DbSet PrimarykeyBuilders { get; set; }
public virtual DbSet ThirdInterfaces { get; set; }
+
+ public virtual DbSet WeChatOrders { get; set; }
+
+ public virtual DbSet WeChatOrderRefunds { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
base.OnConfiguring(optionsBuilder);
diff --git a/src/Shentun.WebPeis.EntityFrameworkCore/Migrations/20241115093850_add_wechat_order.Designer.cs b/src/Shentun.WebPeis.EntityFrameworkCore/Migrations/20241115093850_add_wechat_order.Designer.cs
new file mode 100644
index 0000000..e3d1b73
--- /dev/null
+++ b/src/Shentun.WebPeis.EntityFrameworkCore/Migrations/20241115093850_add_wechat_order.Designer.cs
@@ -0,0 +1,8090 @@
+//
+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("20241115093850_add_wechat_order")]
+ partial class add_wechat_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()
+ .HasColumnType("text")
+ .HasColumnName("code");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .ValueGeneratedOnUpdateSometimes()
+ .HasMaxLength(40)
+ .HasColumnType("character varying(40)")
+ .HasColumnName("concurrency_stamp");
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .ValueGeneratedOnUpdateSometimes()
+ .HasColumnType("text")
+ .HasColumnName("display_name");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .ValueGeneratedOnUpdateSometimes()
+ .HasColumnType("text")
+ .HasColumnName("extra_properties");
+
+ b.Property("IsMedicalCenter")
+ .ValueGeneratedOnUpdateSometimes()
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("is_medical_center");
+
+ b.Property("ParentId")
+ .ValueGeneratedOnUpdateSometimes()
+ .HasColumnType("uuid")
+ .HasColumnName("parent_id");
+
+ b.Property("TenantId")
+ .ValueGeneratedOnUpdateSometimes()
+ .HasColumnType("uuid")
+ .HasColumnName("tenant_id");
+
+ b.HasKey("Id")
+ .HasName("pk_abp_organization_units");
+
+ b.ToTable("abp_organization_units", (string)null);
+ });
+
+ modelBuilder.Entity("Shentun.WebPeis.Models.AppointPatientRegister", b =>
+ {
+ b.Property("AppointPatientRegisterId")
+ .HasColumnType("uuid")
+ .HasColumnName("appoint_patient_register_id");
+
+ b.Property("AppointDate")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp(6) without time zone")
+ .HasColumnName("appoint_date")
+ .HasDefaultValueSql("date(timezone('UTC-8'::text, now()))");
+
+ b.Property("CompleteFlag")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(1)
+ .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("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("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.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("AsbitemId");
+
+ 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.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("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.ChargeBakAsbitem", b =>
+ {
+ b.Property("ChargeBakAsbitemId")
+ .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("ChargeBakId")
+ .HasColumnType("uuid")
+ .HasColumnName("charge_bak_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("ChargeBakAsbitemId")
+ .HasName("pk_charge_bak_asbitem");
+
+ b.HasIndex("ChargeAsbitemId");
+
+ b.HasIndex(new[] { "ChargeBakId", "ChargeAsbitemId" }, "IX_charge_bak_asbitem_asbitem_id")
+ .IsUnique();
+
+ b.ToTable("charge_bak_asbitem", (string)null);
+ });
+
+ modelBuilder.Entity("Shentun.WebPeis.Models.ChargePay", b =>
+ {
+ 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("ChargePayId")
+ .HasColumnType("uuid")
+ .HasColumnName("charge_pay_id");
+
+ b.Property("ConcurrencyStamp")
+ .HasMaxLength(40)
+ .HasColumnType("character varying(40)")
+ .HasColumnName("concurrency_stamp");
+
+ b.Property("PayModeId")
+ .IsRequired()
+ .HasMaxLength(4)
+ .HasColumnType("character varying(4)")
+ .HasColumnName("pay_mode_id")
+ .HasComment("支付方式");
+
+ 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("LastModificationTime")
+ .HasColumnType("timestamp(6) without time zone")
+ .HasColumnName("last_modification_time");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uuid")
+ .HasColumnName("last_modifier_id");
+
+ b.Property("MedicalTimes")
+ .HasColumnType("smallint")
+ .HasColumnName("medical_times")
+ .HasComment("单位体检次数");
+
+ b.Property("RegisterName")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("register_name")
+ .HasComment("计划名称");
+
+ b.Property("RegisterNo")
+ .HasMaxLength(12)
+ .HasColumnType("character varying(12)")
+ .HasColumnName("register_no")
+ .HasComment("计划号");
+
+ b.HasKey("CustomerOrgRegisterId")
+ .HasName("pk_customer_org_register");
+
+ b.HasIndex(new[] { "CustomerOrgId" }, "IX_customer_org_register_customer_org_id");
+
+ b.ToTable("customer_org_register", null, t =>
+ {
+ t.HasComment("团检体检登记");
+ });
+ });
+
+ modelBuilder.Entity("Shentun.WebPeis.Models.Diagnosis", b =>
+ {
+ b.Property("DiagnosisId")
+ .HasColumnType("uuid")
+ .HasColumnName("diagnosis_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("DiagnosisLevelId")
+ .HasColumnType("smallint")
+ .HasColumnName("diagnosis_level_id");
+
+ b.Property("DiagnosisName")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("character varying(100)")
+ .HasColumnName("diagnosis_name")
+ .HasComment("名称");
+
+ b.Property