using Binance.TradeRobot.Model.Base;
using FreeSql.DataAnnotations;
using System;
namespace Binance.TradeRobot.Model.Db
{
[Table(Name = "spotorder", DisableSyncStructure = true)]
public partial class SpotOrder
{
[Column(DbType = "bigint", IsPrimary = true)]
public long Id { get; set; }
///
/// 客户端订单号
///
[Column(StringLength = 50)]
public string ClientOrderId { get; set; }
[Column(DbType = "datetime")]
public DateTime CreateTime { get; set; }
///
/// 交易所Id
///
[Column(DbType = "int", MapType = typeof(int))]
public Enums.Exchange ExchangeId { get; set; }
///
/// 历史利润
///
[Column(DbType = "decimal(18,8)")]
public decimal HistoryTotalProfit { get; set; } = 0.0M;
///
/// 最后交易时间
///
[Column(DbType = "datetime")]
public DateTime? LastTradeTime { get; set; }
///
/// 交易策略
///
[Column(DbType = "int", MapType = typeof(int))]
public Enums.TradePolicy PolicyType { get; set; }
///
/// 订单利润
///
[Column(DbType = "decimal(18,8)")]
public decimal Profit { get; set; } = 0.0M;
[Column(DbType = "bigint")]
public long RobotId { get; set; }
[Column(MapType = typeof(int), DbType = "int")]
public Enums.SpotOrderState State { get; set; }
[Column(MapType = typeof(int), DbType = "int")]
public Enums.TradeDirection TradeDirection { get; set; }
[Column(StringLength = 50, IsNullable = false)]
public string Symbol { get; set; }
///
/// 成交总额
///
[Column(DbType = "decimal(18,8)")]
public decimal TradeAmount { get; set; } = 0.0M;
///
/// 交易次数
///
[Column(DbType = "int")]
public int TradeCount { get; set; } = 0;
///
/// 手续费
///
[Column(DbType = "decimal(18,8)")]
public decimal TradeFee { get; set; } = 0.0M;
///
/// 交易手续费单位
///
[Column(StringLength = 15, IsNullable = false)]
public string TradeFeeUnit { get; set; }
///
/// 成交均价
///
[Column(DbType = "decimal(18,8)")]
public decimal TradePrice { get; set; } = 0.0M;
///
/// 交易量
///
[Column(DbType = "decimal(18,8)")]
public decimal TradeQuantity { get; set; }
[Column(MapType = typeof(int), DbType = "int")]
public Enums.OrderType OrderType { get; set; }
///
/// 借币金额
///
[Column(DbType = "decimal(18,8)")]
public decimal LoanAmount { get; set; } = 0.0M;
///
/// 借币利息
///
[Column(DbType = "decimal(18,8)")]
public decimal LoanInterest { get; set; } = 0.0M;
///
/// 机器人账户持仓数
///
[Column(DbType = "decimal(18,8)")]
public decimal RobotAccountSpotCurrencyQuantity { get; set; } = 0.0M;
///
/// 交易所账户持仓数(废弃)
///
[Column(DbType = "decimal(18,8)")]
public decimal ExchangeAccountSpotCurrencyQuantity { get; set; } = 0.0M;
}
}