Enhance code readability and maintainability by refactoring various components. Update formatting commands in CLAUDE.md for csharpier integration. Simplify method signatures in SegmentFiles, UploadLimits, and multiple endpoint classes for improved clarity. Adjust query handlers and command handlers to streamline parameter handling and enhance consistency across the application.
This commit is contained in:
+61
-44
@@ -11,32 +11,21 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "ChannelAd");
|
||||
migrationBuilder.DropTable(name: "ChannelAd");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ChannelShowHour");
|
||||
migrationBuilder.DropTable(name: "ChannelShowHour");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "OverrideShow");
|
||||
migrationBuilder.DropTable(name: "OverrideShow");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ChannelShow");
|
||||
migrationBuilder.DropTable(name: "ChannelShow");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ProgrammingOverride");
|
||||
migrationBuilder.DropTable(name: "ProgrammingOverride");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "AdInsertion",
|
||||
table: "Channels");
|
||||
migrationBuilder.DropColumn(name: "AdInsertion", table: "Channels");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "AdsPerBreak",
|
||||
table: "Channels");
|
||||
migrationBuilder.DropColumn(name: "AdsPerBreak", table: "Channels");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "NextAdIndex",
|
||||
table: "Channels");
|
||||
migrationBuilder.DropColumn(name: "NextAdIndex", table: "Channels");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -47,21 +36,24 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
table: "Channels",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
defaultValue: 0
|
||||
);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "AdsPerBreak",
|
||||
table: "Channels",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
defaultValue: 0
|
||||
);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "NextAdIndex",
|
||||
table: "Channels",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
defaultValue: 0
|
||||
);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ChannelAd",
|
||||
@@ -70,7 +62,7 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
ChannelId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
MediaAssetId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
Position = table.Column<int>(type: "integer", nullable: false)
|
||||
Position = table.Column<int>(type: "integer", nullable: false),
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
@@ -80,8 +72,10 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
column: x => x.ChannelId,
|
||||
principalTable: "Channels",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
onDelete: ReferentialAction.Cascade
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ChannelShow",
|
||||
@@ -93,9 +87,13 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
ChannelId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
IsEnabled = table.Column<bool>(type: "boolean", nullable: false),
|
||||
NextEpisodeIndex = table.Column<int>(type: "integer", nullable: false),
|
||||
PreferredWeightMultiplier = table.Column<int>(type: "integer", nullable: false, defaultValue: 3),
|
||||
PreferredWeightMultiplier = table.Column<int>(
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 3
|
||||
),
|
||||
ShowId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
Weight = table.Column<int>(type: "integer", nullable: false)
|
||||
Weight = table.Column<int>(type: "integer", nullable: false),
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
@@ -105,8 +103,10 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
column: x => x.ChannelId,
|
||||
principalTable: "Channels",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
onDelete: ReferentialAction.Cascade
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ProgrammingOverride",
|
||||
@@ -116,11 +116,17 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
ChannelId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
DayOfWeek = table.Column<int>(type: "integer", nullable: true),
|
||||
EndMinute = table.Column<int>(type: "integer", nullable: true),
|
||||
EndsAtUtc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
|
||||
EndsAtUtc = table.Column<DateTimeOffset>(
|
||||
type: "timestamp with time zone",
|
||||
nullable: true
|
||||
),
|
||||
Mode = table.Column<int>(type: "integer", nullable: false),
|
||||
Recurrence = table.Column<int>(type: "integer", nullable: false),
|
||||
StartMinute = table.Column<int>(type: "integer", nullable: true),
|
||||
StartsAtUtc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true)
|
||||
StartsAtUtc = table.Column<DateTimeOffset>(
|
||||
type: "timestamp with time zone",
|
||||
nullable: true
|
||||
),
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
@@ -130,8 +136,10 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
column: x => x.ChannelId,
|
||||
principalTable: "Channels",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
onDelete: ReferentialAction.Cascade
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ChannelShowHour",
|
||||
@@ -140,7 +148,7 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
ChannelShowId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
EndHour = table.Column<int>(type: "integer", nullable: false),
|
||||
StartHour = table.Column<int>(type: "integer", nullable: false)
|
||||
StartHour = table.Column<int>(type: "integer", nullable: false),
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
@@ -150,8 +158,10 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
column: x => x.ChannelShowId,
|
||||
principalTable: "ChannelShow",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
onDelete: ReferentialAction.Cascade
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "OverrideShow",
|
||||
@@ -160,7 +170,7 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
ProgrammingOverrideId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
ShowId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
Weight = table.Column<int>(type: "integer", nullable: false)
|
||||
Weight = table.Column<int>(type: "integer", nullable: false),
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
@@ -170,33 +180,40 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
column: x => x.ProgrammingOverrideId,
|
||||
principalTable: "ProgrammingOverride",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
onDelete: ReferentialAction.Cascade
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ChannelAd_ChannelId_Position",
|
||||
table: "ChannelAd",
|
||||
columns: new[] { "ChannelId", "Position" });
|
||||
columns: new[] { "ChannelId", "Position" }
|
||||
);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ChannelShow_ChannelId_ShowId",
|
||||
table: "ChannelShow",
|
||||
columns: new[] { "ChannelId", "ShowId" });
|
||||
columns: new[] { "ChannelId", "ShowId" }
|
||||
);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ChannelShowHour_ChannelShowId",
|
||||
table: "ChannelShowHour",
|
||||
column: "ChannelShowId");
|
||||
column: "ChannelShowId"
|
||||
);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OverrideShow_ProgrammingOverrideId",
|
||||
table: "OverrideShow",
|
||||
column: "ProgrammingOverrideId");
|
||||
column: "ProgrammingOverrideId"
|
||||
);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProgrammingOverride_ChannelId_StartsAtUtc_EndsAtUtc",
|
||||
table: "ProgrammingOverride",
|
||||
columns: new[] { "ChannelId", "StartsAtUtc", "EndsAtUtc" });
|
||||
columns: new[] { "ChannelId", "StartsAtUtc", "EndsAtUtc" }
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user