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

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

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 周比赛盈利表
 *
 * @author y
 * @create 2022/7/19
 */
@Data
@Entity
@Table(name = "activity_race_ranking")
public class ActivityRaceRankingTable extends BaseTable {
    /**
     * 排名
     */
    private Integer rank;
    /**
     * 客户ID
     */
    private Long customId;
    /**
     * 交易账号
     */
    private Long login;
    /**
     * cid
     */
    private Long cId;
    /**
     * 规则ID
     */
    private Long ruleId;
    /**
     * 盈利
     */
    private Float profit;
    /**
     * 人工添加
     */
    private Float manual;
    /**
     * 起始净值
     */
    private Float startEquity;
    /**
     * 结束净值
     */
    private Float endEquity;
    /**
     * 出入金
     */
    private Float dw;
    /**
     * 是否激活排名
     * 如果没有任何交易，不加入排名
     */
    private Integer active;

    public static ActivityRaceRankingTable getInstance(){
        ActivityRaceRankingTable table = new ActivityRaceRankingTable();
        table.setProfit(0F);
        table.setManual(0F);
        table.setStartEquity(0F);
        table.setEndEquity(0F);
        table.setDw(0F);
        table.setRank(0);
        table.setActive(0);
        return table;
    }

}
