5 changed files with 8790 additions and 0 deletions
-
158src/Shentun.WebPeis.Domain/Models/PayOrder.cs
-
43src/Shentun.WebPeis.EntityFrameworkCore/Configures/PayOrderConfigure.cs
-
8357src/Shentun.WebPeis.EntityFrameworkCore/Migrations/20250306031249_insert_pay_order.Designer.cs
-
60src/Shentun.WebPeis.EntityFrameworkCore/Migrations/20250306031249_insert_pay_order.cs
-
172src/Shentun.WebPeis.EntityFrameworkCore/Migrations/WebPeisDbContextModelSnapshot.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 |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 支付订单表
|
||||
|
/// </summary>
|
||||
|
public partial class PayOrder : AuditedEntity, IHasConcurrencyStamp |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 主键
|
||||
|
/// </summary>
|
||||
|
public Guid PayOrderId { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 支付订单号(日期时间+随机数,通过雪花算法生成)
|
||||
|
/// </summary>
|
||||
|
[StringLength(50)] |
||||
|
public string PayOrderNo { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 状态 0-未完成,1-已完成,2-已完成并已经形成收据
|
||||
|
/// </summary>
|
||||
|
public char CompleteFlag { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 收费状态 0-收费,1-退费
|
||||
|
/// </summary>
|
||||
|
public char ChargeFlag { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 退款状态 0-未退,1-部分退,2-全退
|
||||
|
/// </summary>
|
||||
|
public char RefundFlag { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用户id
|
||||
|
/// </summary>
|
||||
|
[StringLength(50)] |
||||
|
public string PatientId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 金额 ,收费是正数,退费是负数
|
||||
|
/// </summary>
|
||||
|
public decimal Charges { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 源自字典表的设置,固定编码,比如:01-现金,02-微信,03,支付宝,04-银行卡等
|
||||
|
/// </summary>
|
||||
|
[StringLength(2)] |
||||
|
public string PayModeId { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 收费订单ID,退费时存储对应的收费订单ID
|
||||
|
/// </summary>
|
||||
|
public Guid? ChargePayOrderId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 支付接口ID,比如01-微信官方接口,02-支付宝官方接口,03-某某公司聚合支付接口
|
||||
|
/// </summary>
|
||||
|
public string PayInterfaceId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 支付源标志,0-体检
|
||||
|
/// </summary>
|
||||
|
public char PayOrderSourceFlag { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// APP类型,0-体检电脑版,2-手机APP,3-微信小程序,4-支付宝小程序。
|
||||
|
/// </summary>
|
||||
|
public int ClientAppType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 0-主扫,1-被扫
|
||||
|
/// </summary>
|
||||
|
public int ScanPayType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 第三方支付订单号
|
||||
|
/// </summary>
|
||||
|
[StringLength(50)] |
||||
|
public string InterfacePayOrderNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 最终支付订单号,比如第三方支付调用微信,这里指微信支付订单号
|
||||
|
/// </summary>
|
||||
|
[StringLength(50)] |
||||
|
public string TargetPayOrderNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 设备号
|
||||
|
/// </summary>
|
||||
|
[StringLength(50)] |
||||
|
public string DeviceNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 第三方支付凭证号,根据第三方接口自定义使用方式
|
||||
|
/// </summary>
|
||||
|
[StringLength(50)] |
||||
|
public string InterfaceSerialNo { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 第三方支付支付日期
|
||||
|
/// </summary>
|
||||
|
public DateTime? InterfacePayDate { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 第三方支付参考号,根据第三方接口自定义使用方式
|
||||
|
/// </summary>
|
||||
|
[StringLength(50)] |
||||
|
public string InterfaceRefnumber { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 第三方支付方式中文名,比如现金、微信,支付宝、建行卡、招商银行卡等
|
||||
|
/// </summary>
|
||||
|
[StringLength(20)] |
||||
|
public string InterfacePayModeName { get; set; } |
||||
|
|
||||
|
|
||||
|
public string InterfaceSerialModeName { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 锁住,默认值N,锁住的只能人工窗口生成收费和退费信息,不能自动生成收费和退费信息,主要用于人工窗口处理异常情况
|
||||
|
/// </summary>
|
||||
|
public char IsLocked { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 生成收据错误次数
|
||||
|
/// </summary>
|
||||
|
public int ErrorCount { get; set; } |
||||
|
|
||||
|
|
||||
|
public string ConcurrencyStamp { get; set; } |
||||
|
|
||||
|
|
||||
|
public override object?[] GetKeys() |
||||
|
{ |
||||
|
return [PayOrderId]; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
||||
@ -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<PayOrder> |
||||
|
{ |
||||
|
public void Configure(EntityTypeBuilder<PayOrder> 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); |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
8357
src/Shentun.WebPeis.EntityFrameworkCore/Migrations/20250306031249_insert_pay_order.Designer.cs
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,60 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
#nullable disable |
||||
|
|
||||
|
namespace Shentun.WebPeis.Migrations |
||||
|
{ |
||||
|
/// <inheritdoc />
|
||||
|
public partial class insert_pay_order : Migration |
||||
|
{ |
||||
|
/// <inheritdoc />
|
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "pay_order", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
pay_order_id = table.Column<Guid>(type: "uuid", nullable: false), |
||||
|
pay_order_no = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false, comment: "支付订单号(日期时间+随机数,通过雪花算法生成)"), |
||||
|
complete_flag = table.Column<char>(type: "character(1)", nullable: false, defaultValueSql: "'0'", comment: "0-未完成,1-已完成,2-已完成并已经形成收据"), |
||||
|
charge_flag = table.Column<char>(type: "character(1)", nullable: false, defaultValueSql: "'0'", comment: "0-收费,1-退费"), |
||||
|
refund_flag = table.Column<char>(type: "character(1)", nullable: false, comment: "退款状态 0-未退,1-部分退,2-全退"), |
||||
|
patient_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false, comment: "用户id"), |
||||
|
charges = table.Column<decimal>(type: "numeric(8,2)", precision: 8, scale: 2, nullable: false, comment: "金额 ,收费是正数,退费是负数"), |
||||
|
pay_mode_id = table.Column<string>(type: "character varying(2)", maxLength: 2, nullable: false, comment: "源自字典表的设置,固定编码,比如:01-现金,02-微信,03,支付宝,04-银行卡等"), |
||||
|
charge_pay_order_id = table.Column<Guid>(type: "uuid", nullable: true, comment: "收费订单ID,退费时存储对应的收费订单ID"), |
||||
|
pay_interface_id = table.Column<string>(type: "text", nullable: false, comment: "支付接口ID,比如01-微信官方接口,02-支付宝官方接口,03-某某公司聚合支付接口"), |
||||
|
pay_order_source_flag = table.Column<char>(type: "character(1)", nullable: false, comment: "支付源标志,0-体检"), |
||||
|
client_app_type = table.Column<int>(type: "integer", nullable: false, comment: "APP类型,0-体检电脑版,2-手机APP,3-微信小程序,4-支付宝小程序。"), |
||||
|
scan_pay_type = table.Column<int>(type: "integer", nullable: false, defaultValueSql: "'0'", comment: " 0-主扫,1-被扫"), |
||||
|
interface_pay_order_no = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false, comment: "第三方支付订单号"), |
||||
|
target_pay_order_no = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false, comment: "最终支付订单号,比如第三方支付调用微信,这里指微信支付订单号"), |
||||
|
device_no = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false, comment: "设备号"), |
||||
|
interface_serial_no = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false, comment: "第三方支付凭证号,根据第三方接口自定义使用方式"), |
||||
|
interface_pay_date = table.Column<DateTime>(type: "timestamp with time zone", nullable: true, comment: "第三方支付支付日期"), |
||||
|
interface_refnumber = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false, comment: "第三方支付参考号,根据第三方接口自定义使用方式"), |
||||
|
interface_pay_mode_name = table.Column<string>(type: "character varying(20)", maxLength: 20, nullable: false, comment: "第三方支付方式中文名,比如现金、微信,支付宝、建行卡、招商银行卡等"), |
||||
|
interface_serial_mode_name = table.Column<string>(type: "text", nullable: false), |
||||
|
is_locked = table.Column<char>(type: "character(1)", nullable: false, comment: "锁住,默认值N,锁住的只能人工窗口生成收费和退费信息,不能自动生成收费和退费信息,主要用于人工窗口处理异常情况"), |
||||
|
error_count = table.Column<int>(type: "integer", nullable: false, defaultValue: 0, comment: "生成收据错误次数"), |
||||
|
concurrency_stamp = table.Column<string>(type: "text", nullable: false), |
||||
|
creation_time = table.Column<DateTime>(type: "timestamp with time zone", nullable: false), |
||||
|
creator_id = table.Column<Guid>(type: "uuid", nullable: true), |
||||
|
last_modification_time = table.Column<DateTime>(type: "timestamp with time zone", nullable: true), |
||||
|
last_modifier_id = table.Column<Guid>(type: "uuid", nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("pk_pay_order", x => x.pay_order_id); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/// <inheritdoc />
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropTable( |
||||
|
name: "pay_order"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue