package com.crm.rely.backend.core.dto.follow.daily;

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

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

/**
 * @Description 比赛每日记录表
 * @Author y
 * @Date 2023/3/24 14:58
 */
@Data
public class FollowDealScoreDailyDto  {

    private Long login;
    /**
     * 期初净值
     */
    private Float startEquity;
    /**
     * 期末净值
     */
    private Float currentEquity;
    /**
     * 总入金
     */
    private Float totalDeposit;
    /**
     * 总出金
     */
    private Float totalWithdrawal;
    /**
     * 盈利率
     * （总投收益：期末净值-期初净值+出金）/（总投入：期初净值+入金）
     */
    private Float profitRatio;
    /**
     * 最大本金收益率
     */
    private Float principalRate;
    /**
     * 最大回撤率
     */
    private Float maxWithdrawalRate;
    /**
     * 平仓总盈亏,累计净利润
     */
    private Float totalProfit;
    /**
     * 订单数
     */
    private Integer tradeCount;
    /**
     * 手数
     */
    private Float volume;



    public static FollowDealScoreDailyDto getInstance() {
        FollowDealScoreDailyDto table = new FollowDealScoreDailyDto();
        table.setCurrentEquity(0F);
        table.setPrincipalRate(0F);
        table.setTotalProfit(0F);
        table.setTradeCount(0);
        table.setVolume(0F);
        table.setMaxWithdrawalRate(0F);
        table.setTotalDeposit(0F);
        table.setTotalWithdrawal(0F);
        table.setStartEquity(0F);
        return table;
    }


}
