diff --git a/Server/src/SOR.Database/Migrations/Catalog/20260423125847_AddNewsPosts.Designer.cs b/Server/src/SOR.Database/Migrations/Catalog/20260423125847_AddNewsPosts.Designer.cs
new file mode 100644
index 0000000..7a690b1
--- /dev/null
+++ b/Server/src/SOR.Database/Migrations/Catalog/20260423125847_AddNewsPosts.Designer.cs
@@ -0,0 +1,655 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+using SOR.Database.Contexts;
+
+#nullable disable
+
+namespace SOR.Database.Migrations.Catalog
+{
+ [DbContext(typeof(CatalogDbContext))]
+ [Migration("20260423125847_AddNewsPosts")]
+ partial class AddNewsPosts
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasDefaultSchema("catalog")
+ .HasAnnotation("ProductVersion", "8.0.0")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.CardAnimationBinding", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("ActionName")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("AnimationCdnUrl")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("AnimationTrackName")
+ .HasColumnType("text");
+
+ b.Property("CardDefinitionId")
+ .HasColumnType("uuid");
+
+ b.Property("CastSoundCdnUrl")
+ .HasColumnType("text");
+
+ b.Property("ImpactSoundCdnUrl")
+ .HasColumnType("text");
+
+ b.Property("IsAiGenerated")
+ .HasColumnType("boolean");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CardDefinitionId", "ActionName")
+ .IsUnique();
+
+ b.ToTable("card_animation_bindings", "catalog");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.CardAsset", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("AssetType")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("CardDefinitionId")
+ .HasColumnType("uuid");
+
+ b.Property("CdnUrl")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("ContentETag")
+ .HasColumnType("text");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("IsAiGenerated")
+ .HasColumnType("boolean");
+
+ b.Property("MimeType")
+ .HasColumnType("text");
+
+ b.Property("ModelFacingDirection")
+ .HasColumnType("text");
+
+ b.Property("ModelTintMaskUrl")
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CardDefinitionId", "AssetType");
+
+ b.ToTable("card_assets", "catalog");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.CardDefinition", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("AbilitiesJson")
+ .HasColumnType("jsonb")
+ .HasColumnName("abilities");
+
+ b.Property("Affinity")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("AttackSoundUrl")
+ .HasColumnType("text");
+
+ b.Property("AttackType")
+ .HasColumnType("text");
+
+ b.Property("BlockedSoundUrl")
+ .HasColumnType("text");
+
+ b.Property("CanAttack")
+ .HasColumnType("boolean");
+
+ b.Property("CanBeAttacked")
+ .HasColumnType("boolean");
+
+ b.Property("CanBeBlocked")
+ .HasColumnType("boolean");
+
+ b.Property("CanBeObstructed")
+ .HasColumnType("boolean");
+
+ b.Property("CanBeSacrificed")
+ .HasColumnType("boolean");
+
+ b.Property("CanDefend")
+ .HasColumnType("boolean");
+
+ b.Property("CanMove")
+ .HasColumnType("boolean");
+
+ b.Property("CanUseAbility")
+ .HasColumnType("boolean");
+
+ b.Property("CardType")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("CollectorNumber")
+ .HasColumnType("integer");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Damage")
+ .HasColumnType("integer");
+
+ b.Property("DamagedSoundUrl")
+ .HasColumnType("text");
+
+ b.Property("DeathSoundUrl")
+ .HasColumnType("text");
+
+ b.Property("DefinitionVersion")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint")
+ .HasDefaultValue(0L);
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Genus")
+ .HasColumnType("text[]");
+
+ b.Property("IsPublished")
+ .HasColumnType("boolean");
+
+ b.Property("IsRetired")
+ .HasColumnType("boolean");
+
+ b.Property("MaxAttackRange")
+ .HasColumnType("integer");
+
+ b.Property("MaxChannelRange")
+ .HasColumnType("integer");
+
+ b.Property("MaxDefense")
+ .HasColumnType("integer");
+
+ b.Property("MaxHealth")
+ .HasColumnType("integer");
+
+ b.Property("MinAttackRange")
+ .HasColumnType("integer");
+
+ b.Property("MinChannelRange")
+ .HasColumnType("integer");
+
+ b.Property("ModelScale")
+ .HasColumnType("real");
+
+ b.Property("ModelTintColor")
+ .HasColumnType("text");
+
+ b.Property("MoveSoundUrl")
+ .HasColumnType("text");
+
+ b.Property("MovementPoints")
+ .HasColumnType("integer");
+
+ b.Property("MovementType")
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("OtherCostsJson")
+ .HasColumnType("jsonb")
+ .HasColumnName("other_costs");
+
+ b.Property("PreviousTierId")
+ .HasColumnType("uuid");
+
+ b.Property("Rarity")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("RequiresLos")
+ .HasColumnType("boolean");
+
+ b.Property("RetiredAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("SetId")
+ .HasColumnType("uuid");
+
+ b.Property("SpCost")
+ .HasColumnType("integer");
+
+ b.Property("StCost")
+ .HasColumnType("integer");
+
+ b.Property("TerramorphaMode")
+ .HasColumnType("text");
+
+ b.Property("Tier")
+ .HasColumnType("integer");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Affinity");
+
+ b.HasIndex("CardType");
+
+ b.HasIndex("DefinitionVersion");
+
+ b.HasIndex("Name");
+
+ b.HasIndex("PreviousTierId");
+
+ b.HasIndex("Rarity");
+
+ b.HasIndex("SetId");
+
+ b.HasIndex("IsPublished", "SetId");
+
+ b.ToTable("card_definitions", "catalog");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.CardSet", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Description")
+ .HasColumnType("text");
+
+ b.Property("IsActive")
+ .HasColumnType("boolean");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("ReleaseDate")
+ .HasColumnType("date");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Code")
+ .IsUnique();
+
+ b.ToTable("card_sets", "catalog");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.CdnUploadRecord", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("ContentType")
+ .HasColumnType("text");
+
+ b.Property("IsAiGenerated")
+ .HasColumnType("boolean");
+
+ b.Property("ObjectKey")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Prefix")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("PublicUrl")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("UploadedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.HasKey("Id");
+
+ b.HasIndex("IsAiGenerated");
+
+ b.HasIndex("ObjectKey")
+ .IsUnique();
+
+ b.HasIndex("Prefix");
+
+ b.ToTable("cdn_upload_records", "catalog");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.GameAudioConfig", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("Context")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("IsActive")
+ .HasColumnType("boolean");
+
+ b.Property("TrackCdnUrl")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("TrackName")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Context");
+
+ b.HasIndex("IsActive");
+
+ b.ToTable("game_audio_configs", "catalog");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.HighlightConfig", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("CdnPath")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("FallbackHex")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Fps")
+ .HasColumnType("real");
+
+ b.Property("FrameCount")
+ .HasColumnType("integer");
+
+ b.Property("HighlightType")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("IsAnimated")
+ .HasColumnType("boolean");
+
+ b.HasKey("Id");
+
+ b.HasIndex("HighlightType")
+ .IsUnique();
+
+ b.ToTable("highlight_configs", "catalog");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.NewsPost", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("AuthorName")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("BodyHtml")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("HeroImageUrl")
+ .HasColumnType("text");
+
+ b.Property("IsPublished")
+ .HasColumnType("boolean");
+
+ b.Property("PublishedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Slug")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Summary")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Slug")
+ .IsUnique();
+
+ b.HasIndex("IsPublished", "PublishedAt");
+
+ b.ToTable("news_posts", "catalog");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.SkyboxDefinition", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("CdnPath")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("CubeNxUrl")
+ .HasColumnType("text")
+ .HasColumnName("cube_nx_url");
+
+ b.Property("CubeNyUrl")
+ .HasColumnType("text")
+ .HasColumnName("cube_ny_url");
+
+ b.Property("CubeNzUrl")
+ .HasColumnType("text")
+ .HasColumnName("cube_nz_url");
+
+ b.Property("CubePxUrl")
+ .HasColumnType("text")
+ .HasColumnName("cube_px_url");
+
+ b.Property("CubePyUrl")
+ .HasColumnType("text")
+ .HasColumnName("cube_py_url");
+
+ b.Property("CubePzUrl")
+ .HasColumnType("text")
+ .HasColumnName("cube_pz_url");
+
+ b.Property("Fps")
+ .HasColumnType("real");
+
+ b.Property("FrameCount")
+ .HasColumnType("integer");
+
+ b.Property("IsActive")
+ .HasColumnType("boolean");
+
+ b.Property("IsAnimated")
+ .HasColumnType("boolean");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("SkyboxType")
+ .HasColumnType("text")
+ .HasColumnName("skybox_type");
+
+ b.HasKey("Id");
+
+ b.HasIndex("IsActive");
+
+ b.ToTable("skybox_definitions", "catalog");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.TileBottomModel", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("CdnKey")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("IsActive")
+ .HasColumnType("boolean");
+
+ b.Property("PublicUrl")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Shape")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Shape", "IsActive");
+
+ b.ToTable("tile_bottom_models", "catalog");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.TileModelBinding", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("Affinity")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("ModelCdnKey")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("ModelPublicUrl")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Shape")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("TexturePublicUrl")
+ .HasColumnType("text");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Affinity", "Shape")
+ .IsUnique();
+
+ b.ToTable("tile_model_bindings", "catalog");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.CardAnimationBinding", b =>
+ {
+ b.HasOne("SOR.Database.Entities.Catalog.CardDefinition", "CardDefinition")
+ .WithMany("AnimationBindings")
+ .HasForeignKey("CardDefinitionId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("CardDefinition");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.CardAsset", b =>
+ {
+ b.HasOne("SOR.Database.Entities.Catalog.CardDefinition", "CardDefinition")
+ .WithMany("Assets")
+ .HasForeignKey("CardDefinitionId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("CardDefinition");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.CardDefinition", b =>
+ {
+ b.HasOne("SOR.Database.Entities.Catalog.CardDefinition", "PreviousTier")
+ .WithMany()
+ .HasForeignKey("PreviousTierId")
+ .OnDelete(DeleteBehavior.SetNull);
+
+ b.HasOne("SOR.Database.Entities.Catalog.CardSet", "Set")
+ .WithMany("Cards")
+ .HasForeignKey("SetId")
+ .OnDelete(DeleteBehavior.SetNull);
+
+ b.Navigation("PreviousTier");
+
+ b.Navigation("Set");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.CardDefinition", b =>
+ {
+ b.Navigation("AnimationBindings");
+
+ b.Navigation("Assets");
+ });
+
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.CardSet", b =>
+ {
+ b.Navigation("Cards");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/Server/src/SOR.Database/Migrations/Catalog/20260423000001_AddNewsPosts.cs b/Server/src/SOR.Database/Migrations/Catalog/20260423125847_AddNewsPosts.cs
similarity index 59%
rename from Server/src/SOR.Database/Migrations/Catalog/20260423000001_AddNewsPosts.cs
rename to Server/src/SOR.Database/Migrations/Catalog/20260423125847_AddNewsPosts.cs
index 047daee..9c4c165 100644
--- a/Server/src/SOR.Database/Migrations/Catalog/20260423000001_AddNewsPosts.cs
+++ b/Server/src/SOR.Database/Migrations/Catalog/20260423125847_AddNewsPosts.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
@@ -16,35 +16,35 @@ namespace SOR.Database.Migrations.Catalog
schema: "catalog",
columns: table => new
{
- Id = table.Column(type: "uuid", nullable: false),
- Slug = table.Column(type: "text", nullable: false),
- Title = table.Column(type: "text", nullable: false),
- Summary = table.Column(type: "text", nullable: false),
- BodyHtml = table.Column(type: "text", nullable: false),
+ Id = table.Column(type: "uuid", nullable: false),
+ Slug = table.Column(type: "text", nullable: false),
+ Title = table.Column(type: "text", nullable: false),
+ Summary = table.Column(type: "text", nullable: false),
+ BodyHtml = table.Column(type: "text", nullable: false),
HeroImageUrl = table.Column(type: "text", nullable: true),
- AuthorName = table.Column(type: "text", nullable: false),
- PublishedAt = table.Column(type: "timestamp with time zone", nullable: true),
- IsPublished = table.Column(type: "boolean", nullable: false),
- CreatedAt = table.Column(type: "timestamp with time zone", nullable: false),
- UpdatedAt = table.Column(type: "timestamp with time zone", nullable: false),
+ AuthorName = table.Column(type: "text", nullable: false),
+ PublishedAt = table.Column(type: "timestamp with time zone", nullable: true),
+ IsPublished = table.Column(type: "boolean", nullable: false),
+ CreatedAt = table.Column(type: "timestamp with time zone", nullable: false),
+ UpdatedAt = table.Column(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_news_posts", x => x.Id);
});
+ migrationBuilder.CreateIndex(
+ name: "IX_news_posts_IsPublished_PublishedAt",
+ schema: "catalog",
+ table: "news_posts",
+ columns: new[] { "IsPublished", "PublishedAt" });
+
migrationBuilder.CreateIndex(
name: "IX_news_posts_Slug",
schema: "catalog",
table: "news_posts",
column: "Slug",
unique: true);
-
- migrationBuilder.CreateIndex(
- name: "IX_news_posts_IsPublished_PublishedAt",
- schema: "catalog",
- table: "news_posts",
- columns: new[] { "IsPublished", "PublishedAt" });
}
///
diff --git a/Server/src/SOR.Database/Migrations/Catalog/CatalogDbContextModelSnapshot.cs b/Server/src/SOR.Database/Migrations/Catalog/CatalogDbContextModelSnapshot.cs
index badcbbd..d3cb50a 100644
--- a/Server/src/SOR.Database/Migrations/Catalog/CatalogDbContextModelSnapshot.cs
+++ b/Server/src/SOR.Database/Migrations/Catalog/CatalogDbContextModelSnapshot.cs
@@ -414,6 +414,57 @@ namespace SOR.Database.Migrations.Catalog
b.ToTable("highlight_configs", "catalog");
});
+ modelBuilder.Entity("SOR.Database.Entities.Catalog.NewsPost", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("AuthorName")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("BodyHtml")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("CreatedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("HeroImageUrl")
+ .HasColumnType("text");
+
+ b.Property("IsPublished")
+ .HasColumnType("boolean");
+
+ b.Property("PublishedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Slug")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Summary")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("timestamp with time zone");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Slug")
+ .IsUnique();
+
+ b.HasIndex("IsPublished", "PublishedAt");
+
+ b.ToTable("news_posts", "catalog");
+ });
+
modelBuilder.Entity("SOR.Database.Entities.Catalog.SkyboxDefinition", b =>
{
b.Property("Id")