Add platform grain
This commit is contained in:
1428
src/Managing.Infrastructure.Database/Migrations/20250814123925_AddBotPositionCounts.Designer.cs
generated
Normal file
1428
src/Managing.Infrastructure.Database/Migrations/20250814123925_AddBotPositionCounts.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,40 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Managing.Infrastructure.Databases.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddBotPositionCounts : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "LongPositionCount",
|
||||
table: "Bots",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ShortPositionCount",
|
||||
table: "Bots",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "LongPositionCount",
|
||||
table: "Bots");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ShortPositionCount",
|
||||
table: "Bots");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,4 +27,6 @@ public class BotEntity
|
||||
public decimal Roi { get; set; }
|
||||
public decimal Volume { get; set; }
|
||||
public decimal Fees { get; set; }
|
||||
public int LongPositionCount { get; set; }
|
||||
public int ShortPositionCount { get; set; }
|
||||
}
|
||||
@@ -688,7 +688,9 @@ public static class PostgreSqlMappers
|
||||
Pnl = entity.Pnl,
|
||||
Roi = entity.Roi,
|
||||
Volume = entity.Volume,
|
||||
Fees = entity.Fees
|
||||
Fees = entity.Fees,
|
||||
LongPositionCount = entity.LongPositionCount,
|
||||
ShortPositionCount = entity.ShortPositionCount
|
||||
};
|
||||
|
||||
return bot;
|
||||
@@ -713,6 +715,8 @@ public static class PostgreSqlMappers
|
||||
Roi = bot.Roi,
|
||||
Volume = bot.Volume,
|
||||
Fees = bot.Fees,
|
||||
LongPositionCount = bot.LongPositionCount,
|
||||
ShortPositionCount = bot.ShortPositionCount,
|
||||
UpdatedAt = DateTime.UtcNow
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user