package co.yixiang.yshop.module.member.dal.dataobject.integralrule;

import co.yixiang.yshop.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;

/**
 * 会员积分规则 DO
 *
 * @author admin
 */
@TableName("yshop_integral_rule")
@KeySequence("yshop_integral_rule_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库，可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
public class IntegralRuleDO extends BaseDO {

    /**
     * 评论ID
     */
    @TableId
    private Long id;
    /**
     * 类型
     */
    private String type;
    /**
     * 类型名称
     */
    private String typeName;
    /**
     * 获取积分
     */
    private Integer integral;
    /**
     * 拓展字段
     */
    private String attribute1;

    /**
     * 图标
     */
    private String iconUrl;

    /**
     * 是否开启
     */
    private Boolean enable;

    public IntegralRuleDO() {
    }

    public IntegralRuleDO(Integer integral) {
        this.integral = integral;
    }

    public IntegralRuleDO(Long id, String type, String typeName, Integer integral, String attribute1, String iconUrl, Boolean enable) {
        this.id = id;
        this.type = type;
        this.typeName = typeName;
        this.integral = integral;
        this.attribute1 = attribute1;
        this.iconUrl = iconUrl;
        this.enable = enable;
    }

    public IntegralRuleDO(Integer integral, Boolean enable) {
        this.integral = integral;
        this.enable = enable;
    }
}
