Refactor code formatting and improve readability: standardize line breaks and indentation across various endpoint files, enhancing code clarity and maintainability. Update package version formatting in Directory.Packages.props for consistency.

This commit is contained in:
Leonid Pershin
2026-07-25 19:55:01 +03:00
parent 1f6fa6f1ae
commit f57b7503ed
122 changed files with 1856 additions and 892 deletions
@@ -16,20 +16,35 @@ namespace TeleWave.Infrastructure.Migrations
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
Name = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false),
Slug = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
Name = table.Column<string>(
type: "character varying(256)",
maxLength: 256,
nullable: false
),
Slug = table.Column<string>(
type: "character varying(128)",
maxLength: 128,
nullable: false
),
IsEnabled = table.Column<bool>(type: "boolean", nullable: false),
EpochUtc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
EpochUtc = table.Column<DateTimeOffset>(
type: "timestamp with time zone",
nullable: false
),
AdInsertion = table.Column<int>(type: "integer", nullable: false),
AdsPerBreak = table.Column<int>(type: "integer", nullable: false),
FillerAssetId = table.Column<Guid>(type: "uuid", nullable: true),
NextAdIndex = table.Column<int>(type: "integer", nullable: false),
CreatedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false)
CreatedAt = table.Column<DateTimeOffset>(
type: "timestamp with time zone",
nullable: false
),
},
constraints: table =>
{
table.PrimaryKey("PK_Channels", x => x.Id);
});
}
);
migrationBuilder.CreateTable(
name: "ScheduleEntries",
@@ -39,30 +54,49 @@ namespace TeleWave.Infrastructure.Migrations
ChannelId = table.Column<Guid>(type: "uuid", nullable: false),
MediaAssetId = table.Column<Guid>(type: "uuid", nullable: false),
Kind = table.Column<int>(type: "integer", nullable: false),
StartsAtUtc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
EndsAtUtc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
StartsAtUtc = table.Column<DateTimeOffset>(
type: "timestamp with time zone",
nullable: false
),
EndsAtUtc = table.Column<DateTimeOffset>(
type: "timestamp with time zone",
nullable: false
),
ShowId = table.Column<Guid>(type: "uuid", nullable: true),
EpisodeIndex = table.Column<int>(type: "integer", nullable: true)
EpisodeIndex = table.Column<int>(type: "integer", nullable: true),
},
constraints: table =>
{
table.PrimaryKey("PK_ScheduleEntries", x => x.Id);
});
}
);
migrationBuilder.CreateTable(
name: "Shows",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
Name = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false),
Description = table.Column<string>(type: "character varying(2048)", maxLength: 2048, nullable: true),
Name = table.Column<string>(
type: "character varying(256)",
maxLength: 256,
nullable: false
),
Description = table.Column<string>(
type: "character varying(2048)",
maxLength: 2048,
nullable: true
),
Kind = table.Column<int>(type: "integer", nullable: false),
CreatedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false)
CreatedAt = table.Column<DateTimeOffset>(
type: "timestamp with time zone",
nullable: false
),
},
constraints: table =>
{
table.PrimaryKey("PK_Shows", x => x.Id);
});
}
);
migrationBuilder.CreateTable(
name: "ChannelAd",
@@ -71,7 +105,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 =>
{
@@ -81,8 +115,10 @@ namespace TeleWave.Infrastructure.Migrations
column: x => x.ChannelId,
principalTable: "Channels",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
onDelete: ReferentialAction.Cascade
);
}
);
migrationBuilder.CreateTable(
name: "ChannelShow",
@@ -95,7 +131,7 @@ namespace TeleWave.Infrastructure.Migrations
BlockMode = table.Column<int>(type: "integer", nullable: false),
BlockValue = table.Column<int>(type: "integer", nullable: false),
IsEnabled = table.Column<bool>(type: "boolean", nullable: false),
NextEpisodeIndex = table.Column<int>(type: "integer", nullable: false)
NextEpisodeIndex = table.Column<int>(type: "integer", nullable: false),
},
constraints: table =>
{
@@ -105,8 +141,10 @@ namespace TeleWave.Infrastructure.Migrations
column: x => x.ChannelId,
principalTable: "Channels",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
onDelete: ReferentialAction.Cascade
);
}
);
migrationBuilder.CreateTable(
name: "ProgrammingOverride",
@@ -115,8 +153,14 @@ namespace TeleWave.Infrastructure.Migrations
Id = table.Column<Guid>(type: "uuid", nullable: false),
ChannelId = table.Column<Guid>(type: "uuid", nullable: false),
Mode = table.Column<int>(type: "integer", nullable: false),
StartsAtUtc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
EndsAtUtc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false)
StartsAtUtc = table.Column<DateTimeOffset>(
type: "timestamp with time zone",
nullable: false
),
EndsAtUtc = table.Column<DateTimeOffset>(
type: "timestamp with time zone",
nullable: false
),
},
constraints: table =>
{
@@ -126,8 +170,10 @@ namespace TeleWave.Infrastructure.Migrations
column: x => x.ChannelId,
principalTable: "Channels",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
onDelete: ReferentialAction.Cascade
);
}
);
migrationBuilder.CreateTable(
name: "ShowEpisode",
@@ -137,7 +183,10 @@ namespace TeleWave.Infrastructure.Migrations
ShowId = table.Column<Guid>(type: "uuid", nullable: false),
MediaAssetId = table.Column<Guid>(type: "uuid", nullable: false),
Position = table.Column<int>(type: "integer", nullable: false),
CreatedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false)
CreatedAt = table.Column<DateTimeOffset>(
type: "timestamp with time zone",
nullable: false
),
},
constraints: table =>
{
@@ -147,8 +196,10 @@ namespace TeleWave.Infrastructure.Migrations
column: x => x.ShowId,
principalTable: "Shows",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
onDelete: ReferentialAction.Cascade
);
}
);
migrationBuilder.CreateTable(
name: "OverrideShow",
@@ -157,7 +208,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 =>
{
@@ -167,87 +218,91 @@ 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_Channels_Slug",
table: "Channels",
column: "Slug",
unique: true);
unique: true
);
migrationBuilder.CreateIndex(
name: "IX_ChannelShow_ChannelId_ShowId",
table: "ChannelShow",
columns: new[] { "ChannelId", "ShowId" });
columns: new[] { "ChannelId", "ShowId" }
);
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" }
);
migrationBuilder.CreateIndex(
name: "IX_ScheduleEntries_ChannelId_EndsAtUtc",
table: "ScheduleEntries",
columns: new[] { "ChannelId", "EndsAtUtc" });
columns: new[] { "ChannelId", "EndsAtUtc" }
);
migrationBuilder.CreateIndex(
name: "IX_ScheduleEntries_ChannelId_ShowId",
table: "ScheduleEntries",
columns: new[] { "ChannelId", "ShowId" });
columns: new[] { "ChannelId", "ShowId" }
);
migrationBuilder.CreateIndex(
name: "IX_ScheduleEntries_ChannelId_StartsAtUtc",
table: "ScheduleEntries",
columns: new[] { "ChannelId", "StartsAtUtc" });
columns: new[] { "ChannelId", "StartsAtUtc" }
);
migrationBuilder.CreateIndex(
name: "IX_ShowEpisode_MediaAssetId",
table: "ShowEpisode",
column: "MediaAssetId");
column: "MediaAssetId"
);
migrationBuilder.CreateIndex(
name: "IX_ShowEpisode_ShowId_Position",
table: "ShowEpisode",
columns: new[] { "ShowId", "Position" });
columns: new[] { "ShowId", "Position" }
);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ChannelAd");
migrationBuilder.DropTable(name: "ChannelAd");
migrationBuilder.DropTable(
name: "ChannelShow");
migrationBuilder.DropTable(name: "ChannelShow");
migrationBuilder.DropTable(
name: "OverrideShow");
migrationBuilder.DropTable(name: "OverrideShow");
migrationBuilder.DropTable(
name: "ScheduleEntries");
migrationBuilder.DropTable(name: "ScheduleEntries");
migrationBuilder.DropTable(
name: "ShowEpisode");
migrationBuilder.DropTable(name: "ShowEpisode");
migrationBuilder.DropTable(
name: "ProgrammingOverride");
migrationBuilder.DropTable(name: "ProgrammingOverride");
migrationBuilder.DropTable(
name: "Shows");
migrationBuilder.DropTable(name: "Shows");
migrationBuilder.DropTable(
name: "Channels");
migrationBuilder.DropTable(name: "Channels");
}
}
}