package com.czg.market.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.time.LocalDateTime;

import java.io.Serial;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 会员等级配置 实体类。
 *
 * @author zs
 * @since 2025-09-10
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("tb_member_level_config")
public class MemberLevelConfig implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    private String remark;

    /**
     * ID
     */
    @Id(keyType = KeyType.Auto)
    private Long id;

    /**
     * 会员名称
     */
    private String name;

    /**
     * 所需成长值
     */
    private Integer experienceValue;

    /**
     * 会员折扣
     */
    private Integer discount;

    /**
     * logo
     */
    private String logo;

    /**
     * 消费送积分，消费n元送1积分, 0为禁用
     */
    private Float costRewardPoints;

    /**
     * 周期奖励状态 0禁用 1启用
     */
    private Integer isCycleReward;

    /**
     * 周期时间包含周 月 年 日
     */
    private Integer cycleTime;
    private String cycleUnit;

    /**
     * 赠送积分
     */
    private Integer cycleRewardPoints;

    /**
     * 优惠券列表
     */
    private String cycleRewardCouponList;

    /**
     * 店铺id
     */
    private Long shopId;

    /**
     * 创建时间
     */
    @Column(onInsertValue = "now()")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private LocalDateTime updateTime;

    /**
     * 是否启用消费送积分
     */
    private Integer isCostRewardPoints;


}
