package com.hzs.common.domain.member.bonus;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.hzs.common.core.web.domain.BaseEntity;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * 会员奖金-奖金收益明细表(报单费、分红、嗨粉)
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@KeySequence("CU_MEMBER_BONUS_DETAIL_SEQ")
@TableName("CU_MEMBER_BONUS_DETAIL")
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CuMemberBonusDetail extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId("PK_ID")
    private Long pkId;

    /**
     * 主表主键
     */
    @TableField("PK_BONUS")
    private Long pkBonus;

    /**
     * 订单主键
     */
    @TableField("PK_ORDER")
    private Long pkOrder;

    @TableField("PK_BONUS_ITEMS")
    private Integer pkBonusItems;

    /**
     * 收益状态 (0=正常，1=烧伤)
     */
    @TableField("INCOME_STATUS")
    private Integer incomeStatus;

    /**
     * 计算类型 1=比例 2=值
     */
    @TableField("CAL_TYPE")
    private Integer calType;

    /**
     * 计算业绩
     */
    @TableField("CAL_ACHIEVE")
    private BigDecimal calAchieve;

    /**
     * 计算比例
     */
    @TableField("CAL_VALUE")
    private BigDecimal calValue;

    /**
     * 税前收益
     */
    @TableField("PRETAX_INCOME")
    private BigDecimal pretaxIncome;

    /**
     * 扣除个税
     */
    @TableField("INCOME_TAX")
    private BigDecimal incomeTax;

    /**
     * 实际收益
     */
    @TableField("REAL_INCOME")
    private BigDecimal realIncome;

    /**
     * 备注
     */
    @TableField("REMARK")
    private String remark;

    /**
     * 收益占比(实发金额/订单金额)
     */
    @TableField("INCOME_RATIO")
    private BigDecimal incomeRatio;

    /**
     * 收益拨比(此类型收益(列如直推累计)÷总拨金额)
     */
    @TableField("INCOME_DIAL_RATIO")
    private BigDecimal incomeDialRatio;

    /**
     * 订单拨比(此订单所有收益之合得实发金额÷订单总金额)
     */
    @TableField("ORDER_DIAL_RATIO")
    private BigDecimal orderDialRatio;
}
