mirror of
https://github.com/CyberL1/Minecraft-Realms-Emulator.git
synced 2026-09-15 19:25:48 -04:00
feat(Core): add realms-related table entities
This commit is contained in:
+219
@@ -0,0 +1,219 @@
|
||||
// <auto-generated />
|
||||
using Core.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Core.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20260614143145_Realms_Init")]
|
||||
partial class Realms_Init
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "10.0.9")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Core.Entities.AppConfig", b =>
|
||||
{
|
||||
b.Property<string>("Key")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<object>("Value")
|
||||
.IsRequired()
|
||||
.HasColumnType("jsonb");
|
||||
|
||||
b.HasKey("Key");
|
||||
|
||||
b.ToTable("AppConfig");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Core.Entities.Player", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<bool>("Accepted")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<bool>("Operator")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int?>("RealmId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Uuid")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RealmId");
|
||||
|
||||
b.ToTable("Players");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Core.Entities.Realm", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("ActiveSlotId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("OwnerId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("ParentWorldId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("State")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("SubscriptionId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("WorldType")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ActiveSlotId");
|
||||
|
||||
b.HasIndex("OwnerId");
|
||||
|
||||
b.HasIndex("ParentWorldId");
|
||||
|
||||
b.HasIndex("SubscriptionId");
|
||||
|
||||
b.ToTable("Realms");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Core.Entities.Slot", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int?>("RealmId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("SlotId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RealmId");
|
||||
|
||||
b.ToTable("Slot");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Core.Entities.Subscription", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("DaysLeft")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("SubscriptionId")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Subscription");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Core.Entities.Player", b =>
|
||||
{
|
||||
b.HasOne("Core.Entities.Realm", null)
|
||||
.WithMany("Players")
|
||||
.HasForeignKey("RealmId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Core.Entities.Realm", b =>
|
||||
{
|
||||
b.HasOne("Core.Entities.Slot", "ActiveSlot")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActiveSlotId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Core.Entities.Player", "Owner")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Core.Entities.Realm", "ParentWorld")
|
||||
.WithMany()
|
||||
.HasForeignKey("ParentWorldId");
|
||||
|
||||
b.HasOne("Core.Entities.Subscription", "Subscription")
|
||||
.WithMany()
|
||||
.HasForeignKey("SubscriptionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ActiveSlot");
|
||||
|
||||
b.Navigation("Owner");
|
||||
|
||||
b.Navigation("ParentWorld");
|
||||
|
||||
b.Navigation("Subscription");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Core.Entities.Slot", b =>
|
||||
{
|
||||
b.HasOne("Core.Entities.Realm", null)
|
||||
.WithMany("Slots")
|
||||
.HasForeignKey("RealmId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Core.Entities.Realm", b =>
|
||||
{
|
||||
b.Navigation("Players");
|
||||
|
||||
b.Navigation("Slots");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user