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

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

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

@Data
@Entity
@Table(name = "follow_period_commission")
public class FollowPeriodCommissionTable extends BaseTable {

    private Long dealId;

    private Long dealLogin;

    private Long dealCustomId;

    @Column(name = "[deal_c_id]")
    private Long dealCId;

    /**
     * 信号源代理ID
     */
    private Long dealAgentId;
    /**
     * 信号源代理的客户信息ID
     */
    private Long dealAgentCustomId;
    /**
     * 信号源代理CID
     */
    @Column(name = "[deal_agent_c_id]")
    private Long dealAgentCId;

    private Long subscribeId;

    private Long subscribeLogin;

    private Long followCustomId;

    private Long followLogin;

    @Column(name = "[follow_c_id]")
    private Long followCId;

    private String followPlatform;

    private Float dealRatio;

    private Float dealCommission;

    private Float agentRatio;

    private Float agentCommission;

    private Float sumCommission;
    /**
     * 计算时间
     */
    private Date calcTime;

    private Float startEquity;

    private Float endEquity;

    private Date startTime;

    private Date endTime;

    private Integer distributionValid;

    public static FollowPeriodCommissionTable getInstance() throws Exception{
        FollowPeriodCommissionTable table = new FollowPeriodCommissionTable();
        table.setDealRatio(0F);
        table.setDealCommission(0F);
        table.setAgentRatio(0F);
        table.setAgentCommission(0F);
        table.setSumCommission(0F);
        table.setStartEquity(0F);
        table.setEndEquity(0F);
        return table;
    }


}
