94 lines
2.2 KiB
C#
94 lines
2.2 KiB
C#
using System.Text.Json.Serialization;
|
|
using TakeoutSaaS.Domain.Stores.Enums;
|
|
using TakeoutSaaS.Shared.Abstractions.Serialization;
|
|
|
|
namespace TakeoutSaaS.Application.App.Stores.Dto;
|
|
|
|
/// <summary>
|
|
/// 门店费用配置 DTO。
|
|
/// </summary>
|
|
public sealed record StoreFeeDto
|
|
{
|
|
/// <summary>
|
|
/// 费用配置 ID。
|
|
/// </summary>
|
|
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
|
|
public long Id { get; init; }
|
|
|
|
/// <summary>
|
|
/// 门店 ID。
|
|
/// </summary>
|
|
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
|
|
public long StoreId { get; init; }
|
|
|
|
/// <summary>
|
|
/// 起送费。
|
|
/// </summary>
|
|
public decimal MinimumOrderAmount { get; init; }
|
|
|
|
/// <summary>
|
|
/// 配送费。
|
|
/// </summary>
|
|
public decimal DeliveryFee { get; init; }
|
|
|
|
/// <summary>
|
|
/// 平台服务费率(%)。
|
|
/// </summary>
|
|
public decimal PlatformServiceRate { get; init; }
|
|
|
|
/// <summary>
|
|
/// 餐具费是否启用。
|
|
/// </summary>
|
|
public bool CutleryFeeEnabled { get; init; }
|
|
|
|
/// <summary>
|
|
/// 餐具费金额。
|
|
/// </summary>
|
|
public decimal CutleryFeeAmount { get; init; }
|
|
|
|
/// <summary>
|
|
/// 加急费是否启用。
|
|
/// </summary>
|
|
public bool RushFeeEnabled { get; init; }
|
|
|
|
/// <summary>
|
|
/// 加急费金额。
|
|
/// </summary>
|
|
public decimal RushFeeAmount { get; init; }
|
|
|
|
/// <summary>
|
|
/// 打包费模式。
|
|
/// </summary>
|
|
public PackagingFeeMode PackagingFeeMode { get; init; }
|
|
|
|
/// <summary>
|
|
/// 订单打包费规则。
|
|
/// </summary>
|
|
public OrderPackagingFeeMode OrderPackagingFeeMode { get; init; }
|
|
|
|
/// <summary>
|
|
/// 固定打包费。
|
|
/// </summary>
|
|
public decimal FixedPackagingFee { get; init; }
|
|
|
|
/// <summary>
|
|
/// 阶梯打包费配置。
|
|
/// </summary>
|
|
public IReadOnlyList<StoreFeeTierDto> PackagingFeeTiers { get; init; } = [];
|
|
|
|
/// <summary>
|
|
/// 免配送费门槛。
|
|
/// </summary>
|
|
public decimal? FreeDeliveryThreshold { get; init; }
|
|
|
|
/// <summary>
|
|
/// 创建时间。
|
|
/// </summary>
|
|
public DateTime CreatedAt { get; init; }
|
|
|
|
/// <summary>
|
|
/// 更新时间。
|
|
/// </summary>
|
|
public DateTime? UpdatedAt { get; init; }
|
|
}
|