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

import com.baomidou.mybatisplus.annotation.*;
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;

    /**
     * 奖衔名称
     */
    @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
     */
    @TableField("COMMUNITY_CHECK")
    private BigDecimal communityCheck;

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

    /**
     * 复购考核
     */
    @TableField("PURCHASE_CHECK")
    private BigDecimal purchaseCheck;

    /**
     * 小区考核结束PV
     */
    @TableField("COMMUNITY_CHECK_END")
    private BigDecimal communityCheckEnd;

    /**
     * 分红考核
     */
    @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)
    @TableField(value = "PK_CHECK_AWARDS_LEFT", jdbcType = JdbcType.NUMERIC, updateStrategy = FieldStrategy.IGNORED)
    private Integer pkCheckAwardsLeft;

    /**
     * 右区奖衔
     */
    @Transaction(transactionKey = EnumsPrefixConstants.KEY_AWARD)
    @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;

    /**
     * 系统类型（2=新零售）
     */
    @TableField("SYSTEM_TYPE")
    private Integer systemType;

    /**
     * 部门数量
     */
    @TableField("PLACE_DEPT_NUM")
    private Integer placeDeptNum;

    /**
     * 累计业绩
     */
    @TableField("TOTAL_CHECK")
    private BigDecimal totalCheck;

    /**
     * 分红小区考核PV
     */
    @TableField("SHARE_COMMUNITY_CHECK")
    private BigDecimal shareCommunityCheck;

    /**
     * 分红小区考核结束PV
     */
    @TableField("SHARE_COMMUNITY_CHECK_END")
    private BigDecimal shareCommunityCheckEnd;

    /**
     * 分红累计业绩
     */
    @TableField("SHARE_TOTAL_CHECK")
    private BigDecimal shareTotalCheck;

    /**
     * 福利级差比例 -- 月度级差
     */
    @TableField("RANGE_RATIO")
    private BigDecimal rangeRatio;

    /**
     * 复购级差比例 -- 月度复购级差
     */
    @TableField("MONTH_REPURCHASE_RATIO")
    private BigDecimal monthRepurchaseRatio;

    /**
     * 福利平均比例 -- 月度分红平均
     */
    @TableField("BENEFIT_AVG_RATIO")
    private BigDecimal benefitAvgRatio;

    /**
     * 福利加权比例 -- 月度分红加权
     */
    @TableField("BENEFIT_SHARE_RATIO")
    private BigDecimal benefitShareRatio;
}
