Fix API offset limit 400 Bad Request, implement requested UI/UX improvements

This commit is contained in:
Richard
2026-07-06 22:34:33 +02:00
parent fb703b6c81
commit 10eefd3546
35 changed files with 4900 additions and 145 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,67 @@
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Predictalytics.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class AddBackgroundJobs : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "BackgroundJobs",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
JobType = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Status = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
TraderId = table.Column<int>(type: "int", nullable: true),
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
StartedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
CompletedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
ErrorMessage = table.Column<string>(type: "varchar(4096)", maxLength: 4096, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_BackgroundJobs", x => x.Id);
table.ForeignKey(
name: "FK_BackgroundJobs_Traders_TraderId",
column: x => x.TraderId,
principalTable: "Traders",
principalColumn: "Id",
onDelete: ReferentialAction.SetNull);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_BackgroundJobs_JobType",
table: "BackgroundJobs",
column: "JobType");
migrationBuilder.CreateIndex(
name: "IX_BackgroundJobs_Status",
table: "BackgroundJobs",
column: "Status");
migrationBuilder.CreateIndex(
name: "IX_BackgroundJobs_TraderId",
table: "BackgroundJobs",
column: "TraderId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "BackgroundJobs");
}
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,29 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Predictalytics.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class AddPositionCheckpoints : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<long>(
name: "LastAppliedTradeId",
table: "TraderPositions",
type: "bigint",
nullable: false,
defaultValue: 0L);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "LastAppliedTradeId",
table: "TraderPositions");
}
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,51 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Predictalytics.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class AddMarketEnhancements : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTime>(
name: "ClosedAt",
table: "Markets",
type: "datetime(6)",
nullable: true);
migrationBuilder.AddColumn<decimal>(
name: "FeeRateBps",
table: "Markets",
type: "decimal(65,30)",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn<bool>(
name: "IsNegRisk",
table: "Markets",
type: "tinyint(1)",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ClosedAt",
table: "Markets");
migrationBuilder.DropColumn(
name: "FeeRateBps",
table: "Markets");
migrationBuilder.DropColumn(
name: "IsNegRisk",
table: "Markets");
}
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,40 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Predictalytics.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class AddBankroll : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<decimal>(
name: "CurrentBalance",
table: "TraderAnalytics",
type: "decimal(65,30)",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn<decimal>(
name: "EstimatedBankroll",
table: "TraderAnalytics",
type: "decimal(65,30)",
nullable: false,
defaultValue: 0m);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "CurrentBalance",
table: "TraderAnalytics");
migrationBuilder.DropColumn(
name: "EstimatedBankroll",
table: "TraderAnalytics");
}
}
}
@@ -191,6 +191,9 @@ namespace Predictalytics.Infrastructure.Migrations
.HasMaxLength(64)
.HasColumnType("varchar(64)");
b.Property<DateTime?>("ClosedAt")
.HasColumnType("datetime(6)");
b.Property<string>("ConditionId")
.IsRequired()
.HasMaxLength(256)
@@ -212,10 +215,16 @@ namespace Predictalytics.Infrastructure.Migrations
b.Property<int>("EventId")
.HasColumnType("int");
b.Property<decimal>("FeeRateBps")
.HasColumnType("decimal(65,30)");
b.Property<string>("ImageUrl")
.HasMaxLength(1024)
.HasColumnType("varchar(1024)");
b.Property<bool>("IsNegRisk")
.HasColumnType("tinyint(1)");
b.Property<bool>("IsResolved")
.HasColumnType("tinyint(1)");
@@ -620,6 +629,12 @@ namespace Predictalytics.Infrastructure.Migrations
b.Property<int>("TraderId")
.HasColumnType("int");
b.Property<decimal>("CurrentBalance")
.HasColumnType("decimal(65,30)");
b.Property<decimal>("EstimatedBankroll")
.HasColumnType("decimal(65,30)");
b.Property<DateTime>("LastCalculatedAt")
.HasColumnType("datetime(6)");
@@ -715,6 +730,9 @@ namespace Predictalytics.Infrastructure.Migrations
.HasPrecision(10, 6)
.HasColumnType("decimal(10,6)");
b.Property<long>("LastAppliedTradeId")
.HasColumnType("bigint");
b.Property<DateTime>("LastUpdatedAt")
.HasColumnType("datetime(6)");