feat: migrate snowflake ids and refresh migrations
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using TakeoutSaaS.Domain.Stores.Entities;
|
||||
using TakeoutSaaS.Domain.Stores.Enums;
|
||||
|
||||
namespace TakeoutSaaS.Domain.Stores.Repositories;
|
||||
|
||||
/// <summary>
|
||||
/// 门店聚合仓储契约。
|
||||
/// </summary>
|
||||
public interface IStoreRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// 依据标识获取门店。
|
||||
/// </summary>
|
||||
Task<Store?> FindByIdAsync(long storeId, long tenantId, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 按租户筛选门店列表。
|
||||
/// </summary>
|
||||
Task<IReadOnlyList<Store>> SearchAsync(long tenantId, StoreStatus? status, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 获取门店营业时段。
|
||||
/// </summary>
|
||||
Task<IReadOnlyList<StoreBusinessHour>> GetBusinessHoursAsync(long storeId, long tenantId, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 获取门店配送区域配置。
|
||||
/// </summary>
|
||||
Task<IReadOnlyList<StoreDeliveryZone>> GetDeliveryZonesAsync(long storeId, long tenantId, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 获取门店节假日配置。
|
||||
/// </summary>
|
||||
Task<IReadOnlyList<StoreHoliday>> GetHolidaysAsync(long storeId, long tenantId, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 获取门店桌台区域。
|
||||
/// </summary>
|
||||
Task<IReadOnlyList<StoreTableArea>> GetTableAreasAsync(long storeId, long tenantId, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 获取门店桌台列表。
|
||||
/// </summary>
|
||||
Task<IReadOnlyList<StoreTable>> GetTablesAsync(long storeId, long tenantId, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 获取门店员工排班。
|
||||
/// </summary>
|
||||
Task<IReadOnlyList<StoreEmployeeShift>> GetShiftsAsync(long storeId, long tenantId, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 新增门店。
|
||||
/// </summary>
|
||||
Task AddStoreAsync(Store store, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 新增营业时段。
|
||||
/// </summary>
|
||||
Task AddBusinessHoursAsync(IEnumerable<StoreBusinessHour> hours, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 新增配送区域。
|
||||
/// </summary>
|
||||
Task AddDeliveryZonesAsync(IEnumerable<StoreDeliveryZone> zones, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 新增节假日配置。
|
||||
/// </summary>
|
||||
Task AddHolidaysAsync(IEnumerable<StoreHoliday> holidays, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 新增桌台区域。
|
||||
/// </summary>
|
||||
Task AddTableAreasAsync(IEnumerable<StoreTableArea> areas, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 新增桌台。
|
||||
/// </summary>
|
||||
Task AddTablesAsync(IEnumerable<StoreTable> tables, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 新增排班。
|
||||
/// </summary>
|
||||
Task AddShiftsAsync(IEnumerable<StoreEmployeeShift> shifts, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 持久化变更。
|
||||
/// </summary>
|
||||
Task SaveChangesAsync(CancellationToken cancellationToken = default);
|
||||
}
|
||||
Reference in New Issue
Block a user