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