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;

/**
 * 跟单日统计信息
 *
 * @author y
 * @create 2022/3/31
 */
@Data
@Entity
@Table(name = "follow_display")
public class FollowDisplayTable extends BaseTable {

    /**
     * 交易账号
     */
    private Long login;
    /**
     * 信号源ID
     */
    private Long dealId;
    /**
     * 周期ID
     */
    private Long periodId;
    /**
     * 周期类型
     */
    private Integer periodType;
    /**
     * 总盈亏
     */
    private Float totalProfit;
    /**
     * 收益率
     */
    private Float income;
    /**
     * 收益率得分
     */
    private Float incomeScore;
    /**
     * 胜率
     */
    private Float winRate;
    /**
     * 胜率
     */
    private Float winRateScore;
    /**
     * 复制者利润
     */
    private Float followIncome;
    /**
     * 复制者利润
     */
    private Float followIncomeScore;
    /**
     * 存款数
     */
    private Float deposit;
    /**
     * 取款数
     */
    private Float withdrawal;
    /**
     * 近7日盈亏
     */
    private Float recentProfit;
    /**
     * 总手数
     */
    private Float totalVolume;
    /**
     * 总手数
     */
    private Float totalVolumeScore;
    /**
     * 平均手数
     */
    private Float avgVolume;
    /**
     * 盈利平均额
     */
    private Float avgWin;
    /**
     * 亏损平均额
     */
    private Float avgLoss;
    /**
     * 最大手数
     */
    private Float maxVolume;
    /**
     * 单笔最大盈利手数
     */
    private Float maxWinVolume;
    /**
     * 单笔最大盈利额
     */
    private Float maxWin;
    /**
     * 单笔最大亏损手数
     */
    private Float maxLossVolume;
    /**
     * 单笔最大亏损额
     */
    private Float maxLoss;
    /**
     * 最大回撤率
     */
    private Float recentDrawDown;
    /**
     * 最大回撤率
     */
    private Float drawDown;
    /**
     * 最大回撤率
     */
    private Float drawDownTemp;
    /**
     * 盈亏比
     */
    private Float profitRate;
    /**
     * 交易总次数
     */
    private Integer amount;
    /**
     * 日均交易次数
     */
    private Float avgAmount;
    /**
     * 单笔最大盈利持仓时长
     */
    private Long maxWinTime;
    /**
     * 单笔最大亏损持仓时长
     */
    private Long maxLossTime;
    /**
     * 最大净值
     */
    private Float maxEquity;
    /**
     * 最小净值
     */
    private Float minEquity;
    /**
     * 胜单数
     */
    private Integer winOrderAmount;
    /**
     * 盈利手数
     */
    private Float winVolume;
    /**
     * 盈利金额
     */
    private Float win;
    /**
     * 亏损手数
     */
    private Float lossVolume;
    /**
     * 亏损金额
     */
    private Float loss;

    private Float totalScore;

    private Date date;

    private Date historyTime;

    private Integer ranking;

    public static FollowDisplayTable getInstance() {
        FollowDisplayTable table = new FollowDisplayTable();
        table.setTotalProfit(0F);
        table.setIncome(0F);
        table.setWinRate(0F);
        table.setWinRateScore(0F);
        table.setFollowIncome(0F);
        table.setFollowIncomeScore(0F);
        table.setDeposit(0F);
        table.setWithdrawal(0F);
        table.setRecentProfit(0F);
        table.setTotalVolume(0F);
        table.setTotalVolumeScore(0F);
        table.setAvgVolume(0F);
        table.setAvgWin(0F);
        table.setAvgLoss(0F);
        table.setMaxVolume(0F);
        table.setMaxWinVolume(0F);
        table.setMaxWin(0F);
        table.setMaxLoss(0F);
        table.setDrawDown(0F);
        table.setDrawDownTemp(0F);
        table.setRecentDrawDown(0F);
        table.setProfitRate(0F);
        table.setAmount(0);
        table.setAvgAmount(0F);
        table.setMaxWinTime(0L);
        table.setMaxLossTime(0L);
        table.setMaxLossVolume(0F);
        table.setMaxEquity(0F);
        table.setMinEquity(0F);
        table.setWinOrderAmount(0);
        table.setWinVolume(0F);
        table.setWin(0F);
        table.setLossVolume(0F);
        table.setLoss(0F);
        table.setIncomeScore(0F);
        table.setTotalScore(0F);
        return table;
    }

}
