feat: migrate snowflake ids and refresh migrations
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using TakeoutSaaS.Domain.Deliveries.Entities;
|
||||
|
||||
namespace TakeoutSaaS.Domain.Deliveries.Repositories;
|
||||
|
||||
/// <summary>
|
||||
/// 配送聚合仓储契约。
|
||||
/// </summary>
|
||||
public interface IDeliveryRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// 依据标识获取配送单。
|
||||
/// </summary>
|
||||
Task<DeliveryOrder?> FindByIdAsync(long deliveryOrderId, long tenantId, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 依据订单标识获取配送单。
|
||||
/// </summary>
|
||||
Task<DeliveryOrder?> FindByOrderIdAsync(long orderId, long tenantId, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 获取配送事件轨迹。
|
||||
/// </summary>
|
||||
Task<IReadOnlyList<DeliveryEvent>> GetEventsAsync(long deliveryOrderId, long tenantId, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 新增配送单。
|
||||
/// </summary>
|
||||
Task AddDeliveryOrderAsync(DeliveryOrder deliveryOrder, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 新增配送事件。
|
||||
/// </summary>
|
||||
Task AddEventAsync(DeliveryEvent deliveryEvent, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 持久化变更。
|
||||
/// </summary>
|
||||
Task SaveChangesAsync(CancellationToken cancellationToken = default);
|
||||
}
|
||||
Reference in New Issue
Block a user