using FreeSql.DataAnnotations;
namespace Binance.TradeRobot.Model.Db
{
[Table(DisableSyncStructure = true)]
public partial class RobotAccount
{
[Column(IsPrimary = true)]
public long Id { get; set; }
///
/// 平仓次数
///
public long ClosePositionCount { get; set; } = 0;
public long RobotId { get; set; }
///
/// 现货/杠杆持仓金额
///
[Column(DbType = "decimal(18,8)")]
public decimal SoptCurrentcyAmount { get; set; } = 0.0M;
///
/// 现货/杠杆持仓数量
///
[Column(DbType = "decimal(18,8)")]
public decimal SpotCurrencyQuantity { get; set; } = 0.0M;
///
/// 总收益
///
[Column(DbType = "decimal(18,8)")]
public decimal TotalProfit { get; set; } = 0.0M;
///
/// 盈利次数
///
public long WinCount { get; set; } = 0;
///
/// 总借币金额
///
[Column(DbType = "decimal(18,8)")]
public decimal LoanAmount { get; set; } = 0.0M;
///
/// 现货持仓均价
///
[Column(IsIgnore = true)]
public decimal SpotCurrencyAcgPrice
{
get
{
return SpotCurrencyQuantity == 0M ? 0M : SoptCurrentcyAmount / SpotCurrencyQuantity;
}
}
}
}