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 = "follow_deal_signal_daily")
public class FollowDealSignalDailyTable extends BaseTable {

    private Long login;

    private Double pl;

    private Double profit;

    private Double loss;
    /**
     *  持仓时间
     */
    private Long holdTime;

    private Double maxHoldVolume;
    /**
     * 总单数
     */
    private Integer trades;
    /**
     * 盈利单数
     */
    private Integer tradesWin;
    /**
     * 亏损单数
     */
    private Integer tradesLoss;
    /**
     * 止损订单数
     */
    private Integer tradesSl;

    private Double deposit;

    private Double withdraw;

    private Double credit;
    /**
     * 期末净值 - 入金 + 出金
     */
    private Double equity;
    /**
     * 当前净值
     */
    private Double currentEquity;

    private Double volume;

    private Integer follows;
    /**
     * 跟单盈利
     */
    private Double followsPl;

    private Integer active;

    private String symbolSummaryStr;
    /**
     * 高水平线
     */
    private Double hwm;
    /**
     * 低水平线
     */
    private Double lwm;
    /**
     * 最大回撤率
     */
    private Double maxDdRate;

    private Date date;

    public static FollowDealSignalDailyTable getInstance() {
        FollowDealSignalDailyTable table = new FollowDealSignalDailyTable();
        table.setPl(0.0);
        table.setProfit(0.0);
        table.setLoss(0.0);
        table.setHoldTime(0L);
        table.setMaxHoldVolume(0D);
        table.setTrades(0);
        table.setTradesWin(0);
        table.setTradesLoss(0);
        table.setTradesSl(0);
        table.setDeposit(0.0);
        table.setWithdraw(0.0);
        table.setCredit(0.0);
        table.setEquity(0.0);
        table.setCurrentEquity(0.0);
        table.setVolume(0.0);
        table.setFollows(0);
        table.setFollowsPl(0D);
        table.setActive(0);
        table.setHwm(0.0);
        table.setLwm(0.0);
        table.setMaxDdRate(0.0);
        return table;
    }


}
