7 changed files with 267 additions and 3 deletions
@ -0,0 +1,24 @@ |
|||||
|
using FreeSql.DataAnnotations; |
||||
|
using System; |
||||
|
|
||||
|
namespace Binance.TradeRobot.Model.Db |
||||
|
{ |
||||
|
|
||||
|
[Table(DisableSyncStructure = true)] |
||||
|
public partial class ExecutionLog { |
||||
|
|
||||
|
[ Column(IsPrimary = true)] |
||||
|
public long Id { get; set; } |
||||
|
|
||||
|
[Column(StringLength = 250, IsNullable = false)] |
||||
|
public string Content { get; set; } |
||||
|
|
||||
|
[Column(InsertValueSql = "getdate()")] |
||||
|
public DateTime CreateTime { get; set; } |
||||
|
|
||||
|
|
||||
|
public long RobotId { get; set; } |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,54 @@ |
|||||
|
using Binance.TradeRobot.Model.Base; |
||||
|
using FreeSql.DataAnnotations; |
||||
|
using System; |
||||
|
|
||||
|
namespace Binance.TradeRobot.Model.Db |
||||
|
{ |
||||
|
|
||||
|
[Table(DisableSyncStructure = true)] |
||||
|
public partial class LoanOrder |
||||
|
{ |
||||
|
|
||||
|
[Column(IsPrimary = true)] |
||||
|
public long Id { get; set; } |
||||
|
|
||||
|
[Column(InsertValueSql = "getdate()")] |
||||
|
public DateTime CreateTime { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 交易所Id
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public int ExchangeId { get; set; } |
||||
|
|
||||
|
|
||||
|
[Column(MapType = typeof(int))] |
||||
|
public Enums.LoanState LoadState { get; set; } = Enums.LoanState.Loaning; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 借币金额
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(18,8)")] |
||||
|
public decimal LoanAmount { get; set; } = 0.0M; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 借币利息
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(18,8)")] |
||||
|
public decimal LoanFee { get; set; } = 0.0M; |
||||
|
|
||||
|
[Column(StringLength = 50, IsNullable = false)] |
||||
|
public string LoanOrderId { get; set; } |
||||
|
|
||||
|
|
||||
|
public DateTime ReturnTime { get; set; } |
||||
|
|
||||
|
|
||||
|
public long RobotId { get; set; } |
||||
|
|
||||
|
|
||||
|
public long SpotOrderId { get; set; } |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,99 @@ |
|||||
|
using Binance.TradeRobot.Model.Base; |
||||
|
using FreeSql.DataAnnotations; |
||||
|
using System; |
||||
|
|
||||
|
namespace Binance.TradeRobot.Model.Db |
||||
|
{ |
||||
|
|
||||
|
[Table(DisableSyncStructure = true)] |
||||
|
public partial class SpotOrder |
||||
|
{ |
||||
|
|
||||
|
[Column(IsPrimary = true)] |
||||
|
public long Id { get; set; } |
||||
|
|
||||
|
[Column(InsertValueSql = "getdate()")] |
||||
|
public DateTime CreateTime { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 交易所Id
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public int ExchangeId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 历史利润
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(18,8)")] |
||||
|
public decimal HistoryTotalProfit { get; set; } = 0.0M; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 最后交易时间
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public DateTime? LastTradeTime { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 交易策略
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public int PolicyType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 订单利润
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(18,8)")] |
||||
|
public decimal Profit { get; set; } = 0.0M; |
||||
|
|
||||
|
|
||||
|
public long RobotId { get; set; } |
||||
|
|
||||
|
|
||||
|
[Column(MapType = typeof(int))] |
||||
|
public Enums.OrderState States { get; set; } |
||||
|
|
||||
|
[Column(MapType = typeof(int))] |
||||
|
public Enums.TradeDirection TradeDirection { get; set; } |
||||
|
|
||||
|
[Column(StringLength = 50, IsNullable = false)] |
||||
|
public string Symbol { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 成交总额
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(18,8)")] |
||||
|
public decimal TradeAmount { get; set; } = 0.0M; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 交易次数
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public int TradeCount { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 手续费
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(18,8)")] |
||||
|
public decimal TradeFee { get; set; } = 0.0M; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 交易手续费单位
|
||||
|
/// </summary>
|
||||
|
[Column(StringLength = 15, IsNullable = false)] |
||||
|
public string TradeFeeUnit { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 成交均价
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(18,8)")] |
||||
|
public decimal TradePrice { get; set; } = 0.0M; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 交易量
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(18,8)")] |
||||
|
public decimal TradeQuantity { get; set; } |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,63 @@ |
|||||
|
using Binance.TradeRobot.Model.Base; |
||||
|
using FreeSql.DataAnnotations; |
||||
|
using System; |
||||
|
|
||||
|
namespace Binance.TradeRobot.Model.Db |
||||
|
{ |
||||
|
|
||||
|
[Table(DisableSyncStructure = true)] |
||||
|
public partial class D21Policy |
||||
|
{ |
||||
|
|
||||
|
[Column(IsPrimary = true)] |
||||
|
public long Id { get; set; } |
||||
|
|
||||
|
[Column(InsertValueSql = "getdate()")] |
||||
|
public DateTime CreateTime { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 执行模式
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public int ExecutionMode { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 是否开启增购
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public bool IsEnabledIncreasePurchase { get; set; } = true; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 是否开启错误信号补救
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public bool IsEnableRemedyForErrorCrossSignal { get; set; } = true; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 最大追高比例
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(18,2)")] |
||||
|
public decimal MaxFollowPurchaseRatio { get; set; } = 0.0M; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 信号周期
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public Enums.SignalPeriod PeriodicSignal { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 仓位
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(18,8)")] |
||||
|
public decimal Position { get; set; } = 0.0M; |
||||
|
|
||||
|
|
||||
|
public long RobotId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 止损比例
|
||||
|
/// </summary>
|
||||
|
public decimal StopLossRatio { get; set; } |
||||
|
} |
||||
|
|
||||
|
} |
@ -1 +1 @@ |
|||||
FreeSql.Generator -Razor 1 -NameOptions 1,0,0,0 -NameSpace Binance.TradeRobot.Model.Db -DB "SqlServer,data source=18.179.56.42;initial catalog=Binance.TradeRobot.DB;User Id=sa;Password=kaicn1132+-;TrustServerCertificate=true;pooling=true;max pool size=2" -FileName "{name}.cs" |
FreeSql.Generator -Razor 1 -NameOptions 1,0,0,0 -NameSpace Binance.TradeRobot.Model.Db -DB "SqlServer,data source=.;initial catalog=Binance.TradeRobot.DB;User Id=sa;Password=pc911103;TrustServerCertificate=true;pooling=true;max pool size=2" -FileName "{name}.cs" |
||||
|
Loading…
Reference in new issue