Orlean (#32)
* Start building with orlean * Add missing file * Serialize grain state * Remove grain and proxies * update and add plan * Update a bit * Fix backtest grain * Fix backtest grain * Clean a bit
This commit is contained in:
@@ -1,17 +1,28 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orleans;
|
||||
using static Managing.Common.Enums;
|
||||
|
||||
[GenerateSerializer]
|
||||
public class LightMoneyManagement
|
||||
{
|
||||
[Id(0)]
|
||||
[Required] public string Name { get; set; }
|
||||
|
||||
[Id(1)]
|
||||
[Required] public Timeframe Timeframe { get; set; }
|
||||
|
||||
[Id(2)]
|
||||
[Required] public decimal StopLoss { get; set; }
|
||||
|
||||
[Id(3)]
|
||||
[Required] public decimal TakeProfit { get; set; }
|
||||
|
||||
[Id(4)]
|
||||
[Required] public decimal Leverage { get; set; }
|
||||
|
||||
public void FormatPercentage()
|
||||
{
|
||||
StopLoss /= 100;
|
||||
TakeProfit /= 100;
|
||||
}
|
||||
public void FormatPercentage()
|
||||
{
|
||||
StopLoss /= 100;
|
||||
TakeProfit /= 100;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
using Managing.Domain.Users;
|
||||
using Orleans;
|
||||
|
||||
namespace Managing.Domain.MoneyManagements
|
||||
{
|
||||
[GenerateSerializer]
|
||||
public class MoneyManagement : LightMoneyManagement
|
||||
{
|
||||
[Id(5)]
|
||||
public User User { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user