Fix Runtime by adding TotalRuntimeInSeconds

This commit is contained in:
2025-10-05 20:51:46 +07:00
parent 976c1a6580
commit f67ee330b3
18 changed files with 3142 additions and 50 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,50 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Managing.Infrastructure.Databases.Migrations
{
/// <inheritdoc />
public partial class AddBotRuntimeTracking : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<long>(
name: "AccumulatedRunTimeSeconds",
table: "Bots",
type: "bigint",
nullable: false,
defaultValue: 0L);
migrationBuilder.AddColumn<DateTime>(
name: "LastStartTime",
table: "Bots",
type: "timestamp with time zone",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "LastStopTime",
table: "Bots",
type: "timestamp with time zone",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "AccumulatedRunTimeSeconds",
table: "Bots");
migrationBuilder.DropColumn(
name: "LastStartTime",
table: "Bots");
migrationBuilder.DropColumn(
name: "LastStopTime",
table: "Bots");
}
}
}

View File

@@ -0,0 +1,22 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Managing.Infrastructure.Databases.Migrations
{
/// <inheritdoc />
public partial class ConfigureBotRuntimeFields : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}

View File

@@ -244,6 +244,9 @@ namespace Managing.Infrastructure.Databases.Migrations
.HasMaxLength(255)
.HasColumnType("uuid");
b.Property<long>("AccumulatedRunTimeSeconds")
.HasColumnType("bigint");
b.Property<DateTime>("CreateDate")
.HasColumnType("timestamp with time zone");
@@ -251,6 +254,12 @@ namespace Managing.Infrastructure.Databases.Migrations
.HasPrecision(18, 8)
.HasColumnType("numeric(18,8)");
b.Property<DateTime?>("LastStartTime")
.HasColumnType("timestamp with time zone");
b.Property<DateTime?>("LastStopTime")
.HasColumnType("timestamp with time zone");
b.Property<int>("LongPositionCount")
.HasColumnType("integer");