docs: 标记自提档期完成
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using TakeoutSaaS.Shared.Abstractions.Entities;
|
||||
|
||||
namespace TakeoutSaaS.Domain.Stores.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// 门店自提配置。
|
||||
/// </summary>
|
||||
public sealed class StorePickupSetting : MultiTenantEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 门店标识。
|
||||
/// </summary>
|
||||
public long StoreId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否允许当天自提。
|
||||
/// </summary>
|
||||
public bool AllowToday { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 可预约天数(含当天)。
|
||||
/// </summary>
|
||||
public int AllowDaysAhead { get; set; } = 3;
|
||||
|
||||
/// <summary>
|
||||
/// 默认截单分钟(开始前多少分钟截止)。
|
||||
/// </summary>
|
||||
public int DefaultCutoffMinutes { get; set; } = 30;
|
||||
|
||||
/// <summary>
|
||||
/// 单笔自提最大份数。
|
||||
/// </summary>
|
||||
public int? MaxQuantityPerOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 并发控制字段。
|
||||
/// </summary>
|
||||
[Timestamp]
|
||||
public byte[] RowVersion { get; set; } = Array.Empty<byte>();
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using TakeoutSaaS.Shared.Abstractions.Entities;
|
||||
|
||||
namespace TakeoutSaaS.Domain.Stores.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// 门店自提档期。
|
||||
/// </summary>
|
||||
public sealed class StorePickupSlot : MultiTenantEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 门店标识。
|
||||
/// </summary>
|
||||
public long StoreId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 档期名称。
|
||||
/// </summary>
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 当天开始时间(UTC)。
|
||||
/// </summary>
|
||||
public TimeSpan StartTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 当天结束时间(UTC)。
|
||||
/// </summary>
|
||||
public TimeSpan EndTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 截单分钟(开始前多少分钟截止)。
|
||||
/// </summary>
|
||||
public int CutoffMinutes { get; set; } = 30;
|
||||
|
||||
/// <summary>
|
||||
/// 容量(份数)。
|
||||
/// </summary>
|
||||
public int Capacity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 已占用数量。
|
||||
/// </summary>
|
||||
public int ReservedCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 适用星期(逗号分隔 1-7)。
|
||||
/// </summary>
|
||||
public string Weekdays { get; set; } = "1,2,3,4,5,6,7";
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用。
|
||||
/// </summary>
|
||||
public bool IsEnabled { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 并发控制字段。
|
||||
/// </summary>
|
||||
[Timestamp]
|
||||
public byte[] RowVersion { get; set; } = Array.Empty<byte>();
|
||||
}
|
||||
@@ -76,6 +76,41 @@ public interface IStoreRepository
|
||||
/// </summary>
|
||||
Task<StoreTable?> FindTableByCodeAsync(string tableCode, long tenantId, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 获取门店自提配置。
|
||||
/// </summary>
|
||||
Task<StorePickupSetting?> GetPickupSettingAsync(long storeId, long tenantId, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 新增自提配置。
|
||||
/// </summary>
|
||||
Task AddPickupSettingAsync(StorePickupSetting setting, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 更新自提配置。
|
||||
/// </summary>
|
||||
Task UpdatePickupSettingAsync(StorePickupSetting setting, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 获取门店自提档期。
|
||||
/// </summary>
|
||||
Task<IReadOnlyList<StorePickupSlot>> GetPickupSlotsAsync(long storeId, long tenantId, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 依据标识获取档期。
|
||||
/// </summary>
|
||||
Task<StorePickupSlot?> FindPickupSlotByIdAsync(long slotId, long tenantId, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 新增加档期。
|
||||
/// </summary>
|
||||
Task AddPickupSlotsAsync(IEnumerable<StorePickupSlot> slots, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 更新档期。
|
||||
/// </summary>
|
||||
Task UpdatePickupSlotAsync(StorePickupSlot slot, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 获取门店员工排班(可选时间范围)。
|
||||
/// </summary>
|
||||
@@ -181,6 +216,11 @@ public interface IStoreRepository
|
||||
/// </summary>
|
||||
Task DeleteTableAsync(long tableId, long tenantId, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 删除自提档期。
|
||||
/// </summary>
|
||||
Task DeletePickupSlotAsync(long slotId, long tenantId, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 删除排班。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user