package com.jeesharp.business.modules.member.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.jeesharp.framework.mybatis.core.dataobject.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 会员等级配置实体类
 *
 * @author jeesharp
 * @version 2024-01-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("app_member_level")
@Schema(description = "会员等级配置实体")
public class MemberLevel extends BaseEntity<MemberLevel> {

    /**
     * 等级编码
     */
    @Schema(description = "等级编码")
    private String levelCode;

    /**
     * 等级名称
     */
    @Schema(description = "等级名称")
    private String levelName;

    /**
     * 等级图标URL
     */
    @Schema(description = "等级图标URL")
    private String levelIcon;

    /**
     * 等级排序
     */
    @Schema(description = "等级排序")
    private Integer levelSort;

    /**
     * 升级所需最低成长值
     */
    @Schema(description = "升级所需最低成长值")
    private Integer minGrowthValue;

    /**
     * 该等级成长值上限
     */
    @Schema(description = "该等级成长值上限")
    private Integer maxGrowthValue;

    /**
     * 折扣率
     */
    @Schema(description = "折扣率")
    private BigDecimal discountRate;

    /**
     * 积分倍率
     */
    @Schema(description = "积分倍率")
    private BigDecimal pointsRate;

    /**
     * 免邮门槛金额
     */
    @Schema(description = "免邮门槛金额")
    private BigDecimal freeShippingThreshold;

    /**
     * 生日赠送积分
     */
    @Schema(description = "生日赠送积分")
    private Integer birthdayPoints;

    /**
     * 升级赠送积分
     */
    @Schema(description = "升级赠送积分")
    private Integer upgradeGiftPoints;

    /**
     * 会员特权描述（JSON）
     */
    @Schema(description = "会员特权描述")
    private String privileges;

    /**
     * 等级有效期（天）
     */
    @Schema(description = "等级有效期（天）")
    private Integer validityDays;

    /**
     * 是否启用降级
     */
    @Schema(description = "是否启用降级：0-不降级 1-启用降级")
    private Integer downgradeEnabled;

    /**
     * 降级周期（天）
     */
    @Schema(description = "降级周期（天）")
    private Integer downgradeCycleDays;

    /**
     * 保级所需最低成长值
     */
    @Schema(description = "保级所需最低成长值")
    private Integer downgradeThreshold;

    /**
     * 状态：0-禁用 1-启用
     */
    @Schema(description = "状态：0-禁用 1-启用")
    private Integer status;

    /**
     * 是否付费等级：0-消费成长等级 1-付费开通等级
     */
    @Schema(description = "是否付费等级：0-消费成长等级 1-付费开通等级")
    private Integer isPaidLevel;
}
