package com.crm.rely.backend.core.pojo.table;


import com.crm.rely.backend.core.pojo.BaseTable;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

@Data
@Entity
@Table(name = "sales_commission_record")
public class SalesCommissionRecordTable extends BaseTable {

    private Long salesId;

    private String salesNo;

    private String salesIdStamp;

    private Integer salesType;

    private Long salesLeaderId;
    /**
     * 个人净入金
     */
    private Float personalDw;
    /**
     * 团队净入金-不包括个人
     */
    private Float teamDw;
    /**
     * 底薪净入金
     * 1. 普通销售是个人的净入金
     * 2. 团队长为个人（试用期不满足条件） 和 团队净入金（包括个人）
     */
    private Float salaryDw;
    /**
     * 底薪金额
     */
    private Float salaryAmount;
    /**
     * 当月个人绩效净入金
     */
    private Float personalKpiDw;
    /**
     * 平均个人绩效净入金
     */
    private Float personalKpiDwAvg;

    /**
     * 当月团队（不包括个人）净入金
     */
    private Float teamKpiDw;
    /**
     * 平均团队（不包括个人）净入金
     */
    private Float teamKpiDwAvg;
    /**
     * 绩效金额 个人绩效+团队绩效
     */
    private Float kpiAmount;



    private Float salaryDwAvg;
    /**
     * 个人绩效金额
     */
    private Float personalKpiAmount;
    /**
     * 全额底薪
     */
    private Float fullSalaryAmount;

    private Float teamKpiAmount;

    private Float teamKpiDwPa;

    private Float teamKpiDwPaAvg;

    private Float teamKpiDwPb;

    private Float teamKpiDwPbAvg;

    private Float teamKpiAmountPa;

    private Float teamKpiAmountPb;

    private Float personalVolume;

    private Float personalVolumeAmount;

    private Float teamVolume;

    private Float teamVolumeAmount;


    private String ym;

    private Long ruleId;
    /**
     * 入职时间
     */
    private Date entryDate;





    public static SalesCommissionRecordTable getInstance() {
        SalesCommissionRecordTable table = new SalesCommissionRecordTable();
        table.setSalaryDw(0F);
        table.setSalaryAmount(0F);
        table.setFullSalaryAmount(0F);
        table.setPersonalKpiDw(0F);
        table.setPersonalKpiAmount(0F);
        table.setTeamKpiDwPa(0F);
        table.setTeamKpiDwPb(0F);
        table.setTeamKpiAmountPb(0F);
        table.setTeamKpiAmountPa(0F);
        table.setPersonalVolume(0F);
        table.setPersonalVolumeAmount(0F);
        table.setTeamVolume(0F);
        table.setTeamVolumeAmount(0F);

        table.setSalaryDwAvg(0F);
        table.setPersonalKpiDwAvg(0F);
        table.setTeamKpiDwPaAvg(0F);
        table.setTeamKpiDwPbAvg(0F);
        table.setTeamKpiDw(0F);
        table.setTeamKpiAmount(0F);
        table.setKpiAmount(0F);

        table.setPersonalDw(0F);
        table.setTeamDw(0F);
        table.setTeamKpiDwAvg(0F);
        return table;
    }

}
