using TakeoutSaaS.Domain.Coupons.Enums;
using TakeoutSaaS.Shared.Abstractions.Entities;

namespace TakeoutSaaS.Domain.Coupons.Entities;

/// <summary>
/// 新客有礼券规则。
/// </summary>
public sealed class NewCustomerCouponRule : MultiTenantEntityBase
{
    /// <summary>
    /// 门店 ID。
    /// </summary>
    public long StoreId { get; set; }

    /// <summary>
    /// 券规则场景。
    /// </summary>
    public NewCustomerCouponScene Scene { get; set; } = NewCustomerCouponScene.Welcome;

    /// <summary>
    /// 券类型。
    /// </summary>
    public NewCustomerCouponType CouponType { get; set; } = NewCustomerCouponType.AmountOff;

    /// <summary>
    /// 面值或折扣值。
    /// </summary>
    public decimal? Value { get; set; }

    /// <summary>
    /// 使用门槛。
    /// </summary>
    public decimal? MinimumSpend { get; set; }

    /// <summary>
    /// 有效期天数。
    /// </summary>
    public int ValidDays { get; set; }

    /// <summary>
    /// 排序值（同场景内递增）。
    /// </summary>
    public int SortOrder { get; set; }
}
