using MediatR;
using TakeoutSaaS.Application.App.Coupons.PunchCard.Dto;
namespace TakeoutSaaS.Application.App.Coupons.PunchCard.Commands;
///
/// 保存次卡模板命令。
///
public sealed class SavePunchCardTemplateCommand : IRequest
{
///
/// 操作门店 ID。
///
public long StoreId { get; init; }
///
/// 次卡模板 ID(编辑时传)。
///
public long? TemplateId { get; init; }
///
/// 次卡名称。
///
public string Name { get; init; } = string.Empty;
///
/// 封面图。
///
public string? CoverImageUrl { get; init; }
///
/// 售价。
///
public decimal SalePrice { get; init; }
///
/// 原价。
///
public decimal? OriginalPrice { get; init; }
///
/// 总次数。
///
public int TotalTimes { get; init; }
///
/// 有效期类型(days/range)。
///
public string ValidityType { get; init; } = "days";
///
/// 固定天数。
///
public int? ValidityDays { get; init; }
///
/// 固定开始日期。
///
public DateTime? ValidFrom { get; init; }
///
/// 固定结束日期。
///
public DateTime? ValidTo { get; init; }
///
/// 范围类型(all/category/tag/product)。
///
public string ScopeType { get; init; } = "all";
///
/// 指定分类 ID。
///
public IReadOnlyCollection ScopeCategoryIds { get; init; } = [];
///
/// 指定标签 ID。
///
public IReadOnlyCollection ScopeTagIds { get; init; } = [];
///
/// 指定商品 ID。
///
public IReadOnlyCollection ScopeProductIds { get; init; } = [];
///
/// 使用模式(free/cap)。
///
public string UsageMode { get; init; } = "free";
///
/// 单次上限金额。
///
public decimal? UsageCapAmount { get; init; }
///
/// 每日限用次数。
///
public int? DailyLimit { get; init; }
///
/// 每单限用次数。
///
public int? PerOrderLimit { get; init; }
///
/// 每人限购张数。
///
public int? PerUserPurchaseLimit { get; init; }
///
/// 是否允许转赠。
///
public bool AllowTransfer { get; init; }
///
/// 过期策略(invalidate/refund)。
///
public string ExpireStrategy { get; init; } = "invalidate";
///
/// 次卡说明。
///
public string? Description { get; init; }
///
/// 通知渠道(in_app/sms)。
///
public IReadOnlyCollection NotifyChannels { get; init; } = [];
}