Update account/position and platform summary

This commit is contained in:
2025-09-26 01:18:59 +07:00
parent b2e38811ed
commit bcfeb693ce
32 changed files with 3301 additions and 151 deletions

View File

@@ -0,0 +1,63 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Managing.Infrastructure.Databases.Migrations
{
/// <inheritdoc />
public partial class RemoveAccountNameFromPositions : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Fee",
table: "Trades");
migrationBuilder.DropColumn(
name: "AccountName",
table: "Positions");
migrationBuilder.AddColumn<decimal>(
name: "GasFees",
table: "Positions",
type: "numeric(18,8)",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn<decimal>(
name: "UiFees",
table: "Positions",
type: "numeric(18,8)",
nullable: false,
defaultValue: 0m);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "GasFees",
table: "Positions");
migrationBuilder.DropColumn(
name: "UiFees",
table: "Positions");
migrationBuilder.AddColumn<decimal>(
name: "Fee",
table: "Trades",
type: "numeric(18,8)",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn<string>(
name: "AccountName",
table: "Positions",
type: "character varying(255)",
maxLength: 255,
nullable: false,
defaultValue: "");
}
}
}

View File

@@ -0,0 +1,29 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Managing.Infrastructure.Databases.Migrations
{
/// <inheritdoc />
public partial class AddAccountIdToPositions : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "AccountId",
table: "Positions",
type: "integer",
nullable: false,
defaultValue: 0);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "AccountId",
table: "Positions");
}
}
}

View File

@@ -666,10 +666,8 @@ namespace Managing.Infrastructure.Databases.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("AccountName")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<int>("AccountId")
.HasColumnType("integer");
b.Property<DateTime>("CreatedAt")
.HasColumnType("timestamp with time zone");
@@ -677,6 +675,9 @@ namespace Managing.Infrastructure.Databases.Migrations
b.Property<DateTime>("Date")
.HasColumnType("timestamp with time zone");
b.Property<decimal>("GasFees")
.HasColumnType("decimal(18,8)");
b.Property<string>("Initiator")
.IsRequired()
.HasColumnType("text");
@@ -719,6 +720,9 @@ namespace Managing.Infrastructure.Databases.Migrations
.IsRequired()
.HasColumnType("text");
b.Property<decimal>("UiFees")
.HasColumnType("decimal(18,8)");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("timestamp with time zone");
@@ -1083,9 +1087,6 @@ namespace Managing.Infrastructure.Databases.Migrations
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<decimal>("Fee")
.HasColumnType("decimal(18,8)");
b.Property<decimal>("Leverage")
.HasColumnType("decimal(18,8)");