package com.jsowell.pile.domain;

import com.jsowell.common.annotation.Excel;
import com.jsowell.common.core.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;

/**
 * 会员组对象 member_group
 *
 * @author jsowell
 * @date 2023-12-26
 */
@Getter
@Setter
public class MemberGroup extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 会员组名称
     */
    @Excel(name = "会员组名称")
    private String groupName;

    /**
     * 会员组编号
     */
    @Excel(name = "会员组编号")
    private String groupCode;

    /**
     * 运营商id
     */
    @Excel(name = "运营商id")
    private String merchantId;

    /**
     * 站点id
     */
    @Excel(name = "站点id")
    private String stationId;

    /**
     * 会员组等级
     */
    @Excel(name = "会员组等级")
    private String groupLevel;

    /**
     * 类型（1-服务费折扣，2-电费折扣 ，3-电费和服务费一起折扣）
     */
    @Excel(name = "类型", readConverterExp = "1=-服务费折扣，2-电费折扣,，=3-电费和服务费一起折扣")
    private String groupType;

    /**
     * 折扣率
     */
    @Excel(name = "折扣率")
    private BigDecimal discount;

    /**
     * 删除标识（0-正常；1-删除）
     */
    private String delFlag;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)
                .append("id", getId())
                .append("groupCode", getGroupCode())
                .append("merchantId", getMerchantId())
                .append("stationId", getStationId())
                .append("groupLevel", getGroupLevel())
                .append("groupType", getGroupType())
                .append("discount", getDiscount())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("delFlag", getDelFlag())
                .toString();
    }
}
