feat: migrate snowflake ids and refresh migrations
This commit is contained in:
@@ -11,7 +11,7 @@ public sealed class PaymentRecord : MultiTenantEntityBase
|
||||
/// <summary>
|
||||
/// 关联订单。
|
||||
/// </summary>
|
||||
public Guid OrderId { get; set; }
|
||||
public long OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付方式。
|
||||
|
||||
@@ -11,12 +11,12 @@ public sealed class PaymentRefundRecord : MultiTenantEntityBase
|
||||
/// <summary>
|
||||
/// 原支付记录标识。
|
||||
/// </summary>
|
||||
public Guid PaymentRecordId { get; set; }
|
||||
public long PaymentRecordId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联订单标识。
|
||||
/// </summary>
|
||||
public Guid OrderId { get; set; }
|
||||
public long OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 退款金额。
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using TakeoutSaaS.Domain.Payments.Entities;
|
||||
|
||||
namespace TakeoutSaaS.Domain.Payments.Repositories;
|
||||
|
||||
/// <summary>
|
||||
/// 支付记录仓储契约。
|
||||
/// </summary>
|
||||
public interface IPaymentRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// 依据标识获取支付记录。
|
||||
/// </summary>
|
||||
Task<PaymentRecord?> FindByIdAsync(long paymentId, long tenantId, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 依据订单标识获取支付记录。
|
||||
/// </summary>
|
||||
Task<PaymentRecord?> FindByOrderIdAsync(long orderId, long tenantId, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 获取支付对应的退款记录。
|
||||
/// </summary>
|
||||
Task<IReadOnlyList<PaymentRefundRecord>> GetRefundsAsync(long paymentId, long tenantId, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 新增支付记录。
|
||||
/// </summary>
|
||||
Task AddPaymentAsync(PaymentRecord payment, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 新增退款记录。
|
||||
/// </summary>
|
||||
Task AddRefundAsync(PaymentRefundRecord refund, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 持久化变更。
|
||||
/// </summary>
|
||||
Task SaveChangesAsync(CancellationToken cancellationToken = default);
|
||||
}
|
||||
Reference in New Issue
Block a user