package com.hzs.common.domain.system.config;

import com.baomidou.mybatisplus.annotation.*;
import com.hzs.common.core.annotation.BigDecimalFormat;
import com.hzs.common.core.annotation.Excel;
import com.hzs.common.core.annotation.Transaction;
import com.hzs.common.core.constant.EnumsPrefixConstants;
import com.hzs.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.apache.ibatis.type.JdbcType;

import java.math.BigDecimal;

/**
 * 奖衔配置类
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("BD_AWARDS")
@KeySequence("BD_AWARDS_SEQ")
public class BdAwards extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId("PK_ID")
    private Integer pkId;

    /**
     * 奖衔名称
     */
    @Excel(name = "奖衔名称", sort = 1)
    @TableField("AWARDS_NAME")
    private String awardsName;
    /**
     * 奖衔名称显示
     */
    @TableField(exist = false)
    private String awardsNameVal;

    /**
     * 翻译key
     */
    @TableField("PK_TRANSACTION")
    private Integer pkTransaction;

    /**
     * 奖衔值
     */
    @TableField("AWARDS_VALUE")
    private Integer awardsValue;

    /**
     * 小区考核PV (万为单位)
     */
    @BigDecimalFormat
    @Excel(name = "小区业绩PV", sort = 2)
    @TableField("COMMUNITY_CHECK")
    private BigDecimal communityCheck;

    /**
     * 代数
     */
    @TableField("ALGEBRA")
    private Integer algebra;

    /**
     * 复购考核
     */
    @BigDecimalFormat
    @Excel(name = "复购考核PV", sort = 3)
    @TableField("PURCHASE_CHECK")
    private BigDecimal purchaseCheck;

    /**
     * 小区考核结束PV (万为单位)
     */
    @BigDecimalFormat
    @Excel(name = "小区业绩结束PV", sort = 2)
    @TableField("COMMUNITY_CHECK_END")
    private BigDecimal communityCheckEnd;

    /**
     * 分红考核
     */
    @BigDecimalFormat
    @Excel(name = "分红考核BV", sort = 4)
    @TableField("SHARE_CHECK")
    private BigDecimal shareCheck;

    /**
     * 环球积分（环球比例）
     */
    @TableField("GLOBAL_INTEGRAL")
    private BigDecimal globalIntegral;

    /**
     * 车奖积分（车奖比例）
     */
    @TableField(value = "CAR_AWARD_POINTS", updateStrategy = FieldStrategy.IGNORED)
    private BigDecimal carAwardPoints;

    /**
     * 左区奖衔
     */
    @Transaction(transactionKey = EnumsPrefixConstants.KEY_AWARD)
    @Excel(name = "左区奖衔", sort = 5)
    @TableField(value = "PK_CHECK_AWARDS_LEFT", jdbcType = JdbcType.NUMERIC, updateStrategy = FieldStrategy.IGNORED)
    private Integer pkCheckAwardsLeft;

    /**
     * 右区奖衔
     */
    @Transaction(transactionKey = EnumsPrefixConstants.KEY_AWARD)
    @Excel(name = "右区奖衔", sort = 6)
    @TableField(value = "PK_CHECK_AWARDS_RIGHT", jdbcType = JdbcType.NUMERIC, updateStrategy = FieldStrategy.IGNORED)
    private Integer pkCheckAwardsRight;

    /**
     * 考核类型 来源于枚举
     */
    @TableField(value = "RELATION_TYPE", jdbcType = JdbcType.NUMERIC, updateStrategy = FieldStrategy.IGNORED)
    private Integer relationType;

    /**
     * 辅导代数
     */
    @TableField("COACH_ALGEBRA")
    private Integer coachAlgebra;

    /**
     * 辅导比例
     */
    @TableField("COACH_RATIO")
    private BigDecimal coachRatio;

    /**
     * 分红比例
     */
    @TableField("ABONUS_RATIO")
    private BigDecimal abonusRatio;
    /**
     * 图片
     */
    @TableField("IMAGE")
    private String image;

    /**
     * 色值
     */
    @TableField("COLOR")
    private String color;

    /**
     * 启用状态 EnableStatus
     */
    @TableField("ENABLE_STATE")
    private Integer enableState;

    /**
     * 文字内容
     */
    @TableField("TEXT_CONTENT")
    private String textContent;

    /**
     * 安置小区月度考核
     */
    @TableField("SMALL_ASSESS")
    private BigDecimal smallAssess;

}
