- SOR.Versioning: version.check handler, ClientRelease entity + admin UI - SOR.Content: incremental card sync (DefinitionVersion cursor via Postgres trigger), content.sync / content.sets / content.card handlers - Chat: presence (account_presence) + notifications with unread count and mark-read - CardDefinition: DefinitionVersion bigint (trigger-assigned) + IsRetired soft-delete - 3 migrations applied to pg-forge-01 (Identity, Chat, Catalog) Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
332 lines
11 KiB
C#
332 lines
11 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
using SOR.Database.Contexts;
|
|
|
|
#nullable disable
|
|
|
|
namespace SOR.Database.Migrations.Catalog
|
|
{
|
|
[DbContext(typeof(CatalogDbContext))]
|
|
partial class CatalogDbContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(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<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("ActionName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("AnimationCdnUrl")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("CardDefinitionId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<bool>("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<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("AssetType")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("CardDefinitionId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("CdnUrl")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTimeOffset>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<bool>("IsAiGenerated")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("MimeType")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CardDefinitionId", "AssetType");
|
|
|
|
b.ToTable("card_assets", "catalog");
|
|
});
|
|
|
|
modelBuilder.Entity("SOR.Database.Entities.Catalog.CardDefinition", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("AbilitiesJson")
|
|
.HasColumnType("jsonb")
|
|
.HasColumnName("abilities");
|
|
|
|
b.Property<string>("Affinity")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("AttackType")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool?>("CanAttack")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool?>("CanBeAttacked")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool?>("CanBeBlocked")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool?>("CanBeObstructed")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool?>("CanBeSacrificed")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool?>("CanDefend")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool?>("CanMove")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool?>("CanUseAbility")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("CardType")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int?>("CollectorNumber")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTimeOffset>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<int?>("Damage")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<long>("DefinitionVersion")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint")
|
|
.HasDefaultValue(0L);
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("EffectsJson")
|
|
.HasColumnType("jsonb")
|
|
.HasColumnName("effects");
|
|
|
|
b.Property<string[]>("Genus")
|
|
.HasColumnType("text[]");
|
|
|
|
b.Property<bool>("IsPublished")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsRetired")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<int?>("MaxAttackRange")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int?>("MaxChannelRange")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int?>("MaxDefense")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int?>("MaxHealth")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int?>("MinAttackRange")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int?>("MinChannelRange")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int?>("MovementPoints")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("MovementType")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("OtherCostsJson")
|
|
.HasColumnType("jsonb")
|
|
.HasColumnName("other_costs");
|
|
|
|
b.Property<Guid?>("PreviousTierId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Rarity")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool?>("RequiresLos")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTimeOffset?>("RetiredAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid?>("SetId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<int>("SpCost")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("StCost")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("TerramorphaMode")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int?>("Tier")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTimeOffset>("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<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Code")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Description")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("IsActive")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateOnly?>("ReleaseDate")
|
|
.HasColumnType("date");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Code")
|
|
.IsUnique();
|
|
|
|
b.ToTable("card_sets", "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
|
|
}
|
|
}
|
|
}
|