using Binance.TradeRobot.Model.Base; using FreeSql.DataAnnotations; using System; namespace Binance.TradeRobot.Model.Db { [Table(Name = "robot", DisableSyncStructure = true)] public partial class Robot { [Column(DbType = "bigint", IsPrimary = true)] public long Id { get; set; } [Column(DbType = "datetime")] public DateTime CreateTime { get; set; } [Column(MapType = typeof(int), DbType = "int")] public Enums.TradePolicy TradePolicy { get; set; } /// /// 运行时长(s) /// [Column(DbType = "bigint")] public long RunningTime { get; set; } = 0; [Column(MapType = typeof(int), DbType = "int")] public Enums.RobotState State { get; set; } [Column(StringLength = 50, IsNullable = false)] public string Symbol { get; set; } [Column(MapType = typeof(int), DbType = "int")] public Enums.BusinessType BusinessType { get; set; } [Column(MapType = typeof(int), DbType = "int")] public Enums.Exchange ExchangeId { get; set; } //#region Symbol Extension //[Column(IsIgnore = true)] //public long SymbolId { get; set; } ///// ///// 卖币精度 ///// //[Column(IsIgnore = true)] //public int SymbolSaleQuantityAccuracy { get; set; } //#endregion #region RobotAccount Extension [Column(IsIgnore = true)] public long RobotAccountId { get; set; } /// /// 平仓次数 /// [Column(IsIgnore = true)] public long ClosePositionCount { get; set; } = 0; /// /// 现货/杠杆持仓金额 /// [Column(IsIgnore = true)] public decimal SoptCurrentcyAmount { get; set; } = 0.0M; /// /// 现货/杠杆持仓数量 /// [Column(IsIgnore = true)] public decimal SpotCurrencyQuantity { get; set; } = 0.0M; /// /// 总收益 /// [Column(IsIgnore = true)] public decimal TotalProfit { get; set; } = 0.0M; /// /// 盈利次数 /// [Column(IsIgnore = true)] public long WinCount { get; set; } = 0; /// /// 总借币金额 /// [Column(IsIgnore = true)] public decimal LoanAmount { get; set; } = 0.0M; #endregion #region ExchangeAPIKey Extension [Column(IsIgnore = true)] public long ExchangeAccountId { get; set; } [Column(IsIgnore = true)] public string ExchangeAPIKey { get; set; } [Column(IsIgnore = true)] public string ExchangeSecretKey { get; set; } #endregion #region D21Policy Extension [Column(IsIgnore = true)] public long D21PolicyId { get; set; } /// /// 执行模式 /// [Column(IsIgnore = true)] public Enums.ExecutionMode D21ExecutionMode { get; set; } = Enums.ExecutionMode.Both; /// /// 是否开启增购 /// [Column(IsIgnore = true)] public bool D21IsEnabledIncreasePurchase { get; set; } = true; /// /// 是否开启错误信号补救 /// [Column(IsIgnore = true)] public bool D21IsEnableRemedyForErrorCrossSignal { get; set; } = true; /// /// 最大追高比例 /// [Column(IsIgnore = true)] public decimal D21MaxFollowPurchaseRatio { get; set; } = 0.0M; /// /// 最大系统借币比例 /// [Column(IsIgnore = true)] public decimal D21MaxSystemLoanRatio { get; set; } = 0.00M; /// /// 最大交易所借币比例 /// [Column(IsIgnore = true)] public decimal D21MaxExchangeLoanRatio { get; set; } = 0.00M; /// /// 信号周期 /// [Column(IsIgnore = true)] public Enums.SignalPeriod D21PeriodicSignal { get; set; } /// /// 仓位 /// [Column(IsIgnore = true)] public decimal D21Position { get; set; } = 0.0M; /// /// 资产配置 /// [Column(IsIgnore = true)] public decimal D21Assets { get; set; } = 0.0M; /// /// 一级止损-成交价亏损比例 /// [Column(IsIgnore = true)] public decimal D21Level1PriceStopLossRatio { get; set; } = 0.0M; /// /// 一级止损-仓位止损比例 /// [Column(IsIgnore = true)] public decimal D21Level1PositionStopLossRatio { get; set; } = 0.0M; /// /// 二级止损-成交价亏损比例 /// [Column(IsIgnore = true)] public decimal D21Level2PriceStopLossRatio { get; set; } = 0.0M; /// /// 二级止损-仓位止损比例 /// [Column(IsIgnore = true)] public decimal D21Level2PositionStopLossRatio { get; set; } = 0.0M; [Column(IsIgnore = true)] public DateTime D21CreateTime { get; set; } #endregion } }