Add agent balance fetch from proxy
This commit is contained in:
1435
src/Managing.Infrastructure.Database/Migrations/20250815134309_AddTotalBalanceToAgent.Designer.cs
generated
Normal file
1435
src/Managing.Infrastructure.Database/Migrations/20250815134309_AddTotalBalanceToAgent.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,31 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Managing.Infrastructure.Databases.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddTotalBalanceToAgent : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "TotalBalance",
|
||||
table: "AgentSummaries",
|
||||
type: "numeric(18,8)",
|
||||
precision: 18,
|
||||
scale: 8,
|
||||
nullable: false,
|
||||
defaultValue: 0m);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TotalBalance",
|
||||
table: "AgentSummaries");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -90,6 +90,10 @@ namespace Managing.Infrastructure.Databases.Migrations
|
||||
b.Property<DateTime?>("Runtime")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<decimal>("TotalBalance")
|
||||
.HasPrecision(18, 8)
|
||||
.HasColumnType("numeric(18,8)");
|
||||
|
||||
b.Property<decimal>("TotalPnL")
|
||||
.HasColumnType("decimal(18,8)");
|
||||
|
||||
|
||||
@@ -545,6 +545,7 @@ public class ManagingDbContext : DbContext
|
||||
entity.Property(e => e.UpdatedAt).IsRequired();
|
||||
entity.Property(e => e.ActiveStrategiesCount).IsRequired();
|
||||
entity.Property(e => e.TotalVolume).HasPrecision(18, 8);
|
||||
entity.Property(e => e.TotalBalance).HasPrecision(18, 8);
|
||||
|
||||
// Create indexes for common queries
|
||||
entity.HasIndex(e => e.UserId).IsUnique();
|
||||
|
||||
Reference in New Issue
Block a user