Revert "refactor: 清理租户API旧模块代码"

This reverts commit 992930a821.
This commit is contained in:
2026-02-17 12:12:01 +08:00
parent 654b1ae3f7
commit c032608a57
910 changed files with 189923 additions and 266 deletions

View File

@@ -0,0 +1,79 @@
using System.Text.Json.Serialization;
using TakeoutSaaS.Domain.Payments.Enums;
using TakeoutSaaS.Shared.Abstractions.Serialization;
namespace TakeoutSaaS.Application.App.Payments.Dto;
/// <summary>
/// 支付记录 DTO。
/// </summary>
public sealed class PaymentDto
{
/// <summary>
/// 支付记录 ID。
/// </summary>
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long Id { get; init; }
/// <summary>
/// 租户 ID。
/// </summary>
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long TenantId { get; init; }
/// <summary>
/// 订单 ID。
/// </summary>
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long OrderId { get; init; }
/// <summary>
/// 支付方式。
/// </summary>
public PaymentMethod Method { get; init; }
/// <summary>
/// 支付状态。
/// </summary>
public PaymentStatus Status { get; init; }
/// <summary>
/// 金额。
/// </summary>
public decimal Amount { get; init; }
/// <summary>
/// 系统交易号。
/// </summary>
public string? TradeNo { get; init; }
/// <summary>
/// 渠道单号。
/// </summary>
public string? ChannelTransactionId { get; init; }
/// <summary>
/// 支付时间。
/// </summary>
public DateTime? PaidAt { get; init; }
/// <summary>
/// 备注。
/// </summary>
public string? Remark { get; init; }
/// <summary>
/// 原始回调。
/// </summary>
public string? Payload { get; init; }
/// <summary>
/// 退款记录。
/// </summary>
public IReadOnlyList<PaymentRefundDto> Refunds { get; init; } = Array.Empty<PaymentRefundDto>();
/// <summary>
/// 创建时间。
/// </summary>
public DateTime CreatedAt { get; init; }
}

View File

@@ -0,0 +1,49 @@
using System.Text.Json.Serialization;
using TakeoutSaaS.Domain.Payments.Enums;
using TakeoutSaaS.Shared.Abstractions.Serialization;
namespace TakeoutSaaS.Application.App.Payments.Dto;
/// <summary>
/// 退款记录 DTO。
/// </summary>
public sealed class PaymentRefundDto
{
/// <summary>
/// 退款记录 ID。
/// </summary>
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long Id { get; init; }
/// <summary>
/// 支付记录 ID。
/// </summary>
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long PaymentRecordId { get; init; }
/// <summary>
/// 订单 ID。
/// </summary>
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long OrderId { get; init; }
/// <summary>
/// 金额。
/// </summary>
public decimal Amount { get; init; }
/// <summary>
/// 渠道退款号。
/// </summary>
public string? ChannelRefundId { get; init; }
/// <summary>
/// 状态。
/// </summary>
public PaymentRefundStatus Status { get; init; }
/// <summary>
/// 原始回调。
/// </summary>
public string? Payload { get; init; }
}