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

namespace TakeoutSaaS.Domain.Membership.Entities;

/// <summary>
/// 会员积分商城规则配置。
/// </summary>
public sealed class MemberPointMallRule : MultiTenantEntityBase
{
    /// <summary>
    /// 门店标识。
    /// </summary>
    public long StoreId { get; set; }

    /// <summary>
    /// 是否启用消费获取。
    /// </summary>
    public bool IsConsumeRewardEnabled { get; set; } = true;

    /// <summary>
    /// 每消费多少元触发一次积分计算。
    /// </summary>
    public int ConsumeAmountPerStep { get; set; } = 1;

    /// <summary>
    /// 每步获得积分。
    /// </summary>
    public int ConsumeRewardPointsPerStep { get; set; } = 1;

    /// <summary>
    /// 是否启用评价奖励。
    /// </summary>
    public bool IsReviewRewardEnabled { get; set; } = true;

    /// <summary>
    /// 评价奖励积分。
    /// </summary>
    public int ReviewRewardPoints { get; set; } = 10;

    /// <summary>
    /// 是否启用注册奖励。
    /// </summary>
    public bool IsRegisterRewardEnabled { get; set; } = true;

    /// <summary>
    /// 注册奖励积分。
    /// </summary>
    public int RegisterRewardPoints { get; set; } = 100;

    /// <summary>
    /// 是否启用签到奖励。
    /// </summary>
    public bool IsSigninRewardEnabled { get; set; }

    /// <summary>
    /// 签到奖励积分。
    /// </summary>
    public int SigninRewardPoints { get; set; } = 5;

    /// <summary>
    /// 积分有效期模式。
    /// </summary>
    public MemberPointMallExpiryMode ExpiryMode { get; set; } = MemberPointMallExpiryMode.YearlyClear;
}
