feat(store): 扩展临时时段配置

This commit is contained in:
2026-01-20 18:41:34 +08:00
parent 3385674490
commit 32f5bbbd43
15 changed files with 7871 additions and 33 deletions

View File

@@ -1,10 +1,11 @@
using MediatR;
using TakeoutSaaS.Application.App.Stores.Dto;
using TakeoutSaaS.Domain.Stores.Enums;
namespace TakeoutSaaS.Application.App.Stores.Commands;
/// <summary>
/// 创建节假日配置命令。
/// 创建临时时段配置命令。
/// </summary>
public sealed record CreateStoreHolidayCommand : IRequest<StoreHolidayDto>
{
@@ -14,14 +15,34 @@ public sealed record CreateStoreHolidayCommand : IRequest<StoreHolidayDto>
public long StoreId { get; init; }
/// <summary>
/// 日期。
/// 开始日期。
/// </summary>
public DateTime Date { get; init; }
/// <summary>
/// 是否闭店
/// 结束日期(可选)
/// </summary>
public bool IsClosed { get; init; } = true;
public DateTime? EndDate { get; init; }
/// <summary>
/// 是否全天。
/// </summary>
public bool IsAllDay { get; init; } = true;
/// <summary>
/// 开始时间IsAllDay=false 时必填)。
/// </summary>
public TimeSpan? StartTime { get; init; }
/// <summary>
/// 结束时间IsAllDay=false 时必填)。
/// </summary>
public TimeSpan? EndTime { get; init; }
/// <summary>
/// 覆盖类型。
/// </summary>
public OverrideType OverrideType { get; init; } = OverrideType.Closed;
/// <summary>
/// 说明。

View File

@@ -1,10 +1,11 @@
using MediatR;
using TakeoutSaaS.Application.App.Stores.Dto;
using TakeoutSaaS.Domain.Stores.Enums;
namespace TakeoutSaaS.Application.App.Stores.Commands;
/// <summary>
/// 更新节假日配置命令。
/// 更新临时时段配置命令。
/// </summary>
public sealed record UpdateStoreHolidayCommand : IRequest<StoreHolidayDto?>
{
@@ -19,14 +20,34 @@ public sealed record UpdateStoreHolidayCommand : IRequest<StoreHolidayDto?>
public long StoreId { get; init; }
/// <summary>
/// 日期。
/// 开始日期。
/// </summary>
public DateTime Date { get; init; }
/// <summary>
/// 是否闭店
/// 结束日期(可选)
/// </summary>
public bool IsClosed { get; init; } = true;
public DateTime? EndDate { get; init; }
/// <summary>
/// 是否全天。
/// </summary>
public bool IsAllDay { get; init; } = true;
/// <summary>
/// 开始时间IsAllDay=false 时必填)。
/// </summary>
public TimeSpan? StartTime { get; init; }
/// <summary>
/// 结束时间IsAllDay=false 时必填)。
/// </summary>
public TimeSpan? EndTime { get; init; }
/// <summary>
/// 覆盖类型。
/// </summary>
public OverrideType OverrideType { get; init; } = OverrideType.Closed;
/// <summary>
/// 说明。