feat: 完成门店子资源管理与文档同步
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
using MediatR;
|
||||
using TakeoutSaaS.Application.App.Stores.Dto;
|
||||
using TakeoutSaaS.Domain.Stores.Enums;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.Stores.Commands;
|
||||
|
||||
/// <summary>
|
||||
/// 创建营业时段命令。
|
||||
/// </summary>
|
||||
public sealed record CreateStoreBusinessHourCommand : IRequest<StoreBusinessHourDto>
|
||||
{
|
||||
/// <summary>
|
||||
/// 门店 ID。
|
||||
/// </summary>
|
||||
public long StoreId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 星期几。
|
||||
/// </summary>
|
||||
public DayOfWeek DayOfWeek { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 时段类型。
|
||||
/// </summary>
|
||||
public BusinessHourType HourType { get; init; } = BusinessHourType.Normal;
|
||||
|
||||
/// <summary>
|
||||
/// 开始时间。
|
||||
/// </summary>
|
||||
public TimeSpan StartTime { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 结束时间。
|
||||
/// </summary>
|
||||
public TimeSpan EndTime { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 容量限制。
|
||||
/// </summary>
|
||||
public int? CapacityLimit { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注。
|
||||
/// </summary>
|
||||
public string? Notes { get; init; }
|
||||
}
|
||||
@@ -98,4 +98,14 @@ public sealed class CreateStoreCommand : IRequest<StoreDto>
|
||||
/// 支持配送。
|
||||
/// </summary>
|
||||
public bool SupportsDelivery { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 支持预约。
|
||||
/// </summary>
|
||||
public bool SupportsReservation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支持排队叫号。
|
||||
/// </summary>
|
||||
public bool SupportsQueueing { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
using MediatR;
|
||||
using TakeoutSaaS.Application.App.Stores.Dto;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.Stores.Commands;
|
||||
|
||||
/// <summary>
|
||||
/// 创建配送区域命令。
|
||||
/// </summary>
|
||||
public sealed record CreateStoreDeliveryZoneCommand : IRequest<StoreDeliveryZoneDto>
|
||||
{
|
||||
/// <summary>
|
||||
/// 门店 ID。
|
||||
/// </summary>
|
||||
public long StoreId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 区域名称。
|
||||
/// </summary>
|
||||
public string ZoneName { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// GeoJSON。
|
||||
/// </summary>
|
||||
public string PolygonGeoJson { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 起送价。
|
||||
/// </summary>
|
||||
public decimal? MinimumOrderAmount { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 配送费。
|
||||
/// </summary>
|
||||
public decimal? DeliveryFee { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 预计分钟。
|
||||
/// </summary>
|
||||
public int? EstimatedMinutes { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序。
|
||||
/// </summary>
|
||||
public int SortOrder { get; init; } = 100;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using MediatR;
|
||||
using TakeoutSaaS.Application.App.Stores.Dto;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.Stores.Commands;
|
||||
|
||||
/// <summary>
|
||||
/// 创建节假日配置命令。
|
||||
/// </summary>
|
||||
public sealed record CreateStoreHolidayCommand : IRequest<StoreHolidayDto>
|
||||
{
|
||||
/// <summary>
|
||||
/// 门店 ID。
|
||||
/// </summary>
|
||||
public long StoreId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 日期。
|
||||
/// </summary>
|
||||
public DateTime Date { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否闭店。
|
||||
/// </summary>
|
||||
public bool IsClosed { get; init; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 说明。
|
||||
/// </summary>
|
||||
public string? Reason { get; init; }
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using MediatR;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.Stores.Commands;
|
||||
|
||||
/// <summary>
|
||||
/// 删除营业时段命令。
|
||||
/// </summary>
|
||||
public sealed record DeleteStoreBusinessHourCommand : IRequest<bool>
|
||||
{
|
||||
/// <summary>
|
||||
/// 门店 ID。
|
||||
/// </summary>
|
||||
public long StoreId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 营业时段 ID。
|
||||
/// </summary>
|
||||
public long BusinessHourId { get; init; }
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using MediatR;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.Stores.Commands;
|
||||
|
||||
/// <summary>
|
||||
/// 删除配送区域命令。
|
||||
/// </summary>
|
||||
public sealed record DeleteStoreDeliveryZoneCommand : IRequest<bool>
|
||||
{
|
||||
/// <summary>
|
||||
/// 门店 ID。
|
||||
/// </summary>
|
||||
public long StoreId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 配送区域 ID。
|
||||
/// </summary>
|
||||
public long DeliveryZoneId { get; init; }
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using MediatR;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.Stores.Commands;
|
||||
|
||||
/// <summary>
|
||||
/// 删除节假日配置命令。
|
||||
/// </summary>
|
||||
public sealed record DeleteStoreHolidayCommand : IRequest<bool>
|
||||
{
|
||||
/// <summary>
|
||||
/// 门店 ID。
|
||||
/// </summary>
|
||||
public long StoreId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 节假日 ID。
|
||||
/// </summary>
|
||||
public long HolidayId { get; init; }
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
using MediatR;
|
||||
using TakeoutSaaS.Application.App.Stores.Dto;
|
||||
using TakeoutSaaS.Domain.Stores.Enums;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.Stores.Commands;
|
||||
|
||||
/// <summary>
|
||||
/// 更新营业时段命令。
|
||||
/// </summary>
|
||||
public sealed record UpdateStoreBusinessHourCommand : IRequest<StoreBusinessHourDto?>
|
||||
{
|
||||
/// <summary>
|
||||
/// 营业时段 ID。
|
||||
/// </summary>
|
||||
public long BusinessHourId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 门店 ID。
|
||||
/// </summary>
|
||||
public long StoreId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 星期几。
|
||||
/// </summary>
|
||||
public DayOfWeek DayOfWeek { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 时段类型。
|
||||
/// </summary>
|
||||
public BusinessHourType HourType { get; init; } = BusinessHourType.Normal;
|
||||
|
||||
/// <summary>
|
||||
/// 开始时间。
|
||||
/// </summary>
|
||||
public TimeSpan StartTime { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 结束时间。
|
||||
/// </summary>
|
||||
public TimeSpan EndTime { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 容量限制。
|
||||
/// </summary>
|
||||
public int? CapacityLimit { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注。
|
||||
/// </summary>
|
||||
public string? Notes { get; init; }
|
||||
}
|
||||
@@ -103,4 +103,14 @@ public sealed record UpdateStoreCommand : IRequest<StoreDto?>
|
||||
/// 支持配送。
|
||||
/// </summary>
|
||||
public bool SupportsDelivery { get; init; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 支持预约。
|
||||
/// </summary>
|
||||
public bool SupportsReservation { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 支持排队叫号。
|
||||
/// </summary>
|
||||
public bool SupportsQueueing { get; init; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
using MediatR;
|
||||
using TakeoutSaaS.Application.App.Stores.Dto;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.Stores.Commands;
|
||||
|
||||
/// <summary>
|
||||
/// 更新配送区域命令。
|
||||
/// </summary>
|
||||
public sealed record UpdateStoreDeliveryZoneCommand : IRequest<StoreDeliveryZoneDto?>
|
||||
{
|
||||
/// <summary>
|
||||
/// 配送区域 ID。
|
||||
/// </summary>
|
||||
public long DeliveryZoneId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 门店 ID。
|
||||
/// </summary>
|
||||
public long StoreId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 区域名称。
|
||||
/// </summary>
|
||||
public string ZoneName { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// GeoJSON。
|
||||
/// </summary>
|
||||
public string PolygonGeoJson { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 起送价。
|
||||
/// </summary>
|
||||
public decimal? MinimumOrderAmount { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 配送费。
|
||||
/// </summary>
|
||||
public decimal? DeliveryFee { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 预计分钟。
|
||||
/// </summary>
|
||||
public int? EstimatedMinutes { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序。
|
||||
/// </summary>
|
||||
public int SortOrder { get; init; } = 100;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using MediatR;
|
||||
using TakeoutSaaS.Application.App.Stores.Dto;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.Stores.Commands;
|
||||
|
||||
/// <summary>
|
||||
/// 更新节假日配置命令。
|
||||
/// </summary>
|
||||
public sealed record UpdateStoreHolidayCommand : IRequest<StoreHolidayDto?>
|
||||
{
|
||||
/// <summary>
|
||||
/// 节假日 ID。
|
||||
/// </summary>
|
||||
public long HolidayId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 门店 ID。
|
||||
/// </summary>
|
||||
public long StoreId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 日期。
|
||||
/// </summary>
|
||||
public DateTime Date { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否闭店。
|
||||
/// </summary>
|
||||
public bool IsClosed { get; init; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 说明。
|
||||
/// </summary>
|
||||
public string? Reason { get; init; }
|
||||
}
|
||||
Reference in New Issue
Block a user