566 lines
20 KiB
C#
566 lines
20 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Moonlight.ApiServer.Database;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace Moonlight.ApiServer.Database.Migrations
|
|
{
|
|
[DbContext(typeof(CoreDataContext))]
|
|
[Migration("20250919201409_RecreatedMigrationsForChangeOfSchema")]
|
|
partial class RecreatedMigrationsForChangeOfSchema
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasDefaultSchema("core")
|
|
.HasAnnotation("ProductVersion", "9.0.8")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("Hangfire.EntityFrameworkCore.HangfireCounter", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
|
|
|
b.Property<DateTime?>("ExpireAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Key")
|
|
.IsRequired()
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<long>("Value")
|
|
.HasColumnType("bigint");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ExpireAt");
|
|
|
|
b.HasIndex("Key", "Value");
|
|
|
|
b.ToTable("HangfireCounter", "core");
|
|
});
|
|
|
|
modelBuilder.Entity("Hangfire.EntityFrameworkCore.HangfireHash", b =>
|
|
{
|
|
b.Property<string>("Key")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<string>("Field")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<DateTime?>("ExpireAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Value")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Key", "Field");
|
|
|
|
b.HasIndex("ExpireAt");
|
|
|
|
b.ToTable("HangfireHash", "core");
|
|
});
|
|
|
|
modelBuilder.Entity("Hangfire.EntityFrameworkCore.HangfireJob", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<DateTime?>("ExpireAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("InvocationData")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<long?>("StateId")
|
|
.HasColumnType("bigint");
|
|
|
|
b.Property<string>("StateName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ExpireAt");
|
|
|
|
b.HasIndex("StateId");
|
|
|
|
b.HasIndex("StateName");
|
|
|
|
b.ToTable("HangfireJob", "core");
|
|
});
|
|
|
|
modelBuilder.Entity("Hangfire.EntityFrameworkCore.HangfireJobParameter", b =>
|
|
{
|
|
b.Property<long>("JobId")
|
|
.HasColumnType("bigint");
|
|
|
|
b.Property<string>("Name")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<string>("Value")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("JobId", "Name");
|
|
|
|
b.ToTable("HangfireJobParameter", "core");
|
|
});
|
|
|
|
modelBuilder.Entity("Hangfire.EntityFrameworkCore.HangfireList", b =>
|
|
{
|
|
b.Property<string>("Key")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<int>("Position")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime?>("ExpireAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Value")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Key", "Position");
|
|
|
|
b.HasIndex("ExpireAt");
|
|
|
|
b.ToTable("HangfireList", "core");
|
|
});
|
|
|
|
modelBuilder.Entity("Hangfire.EntityFrameworkCore.HangfireLock", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<DateTime>("AcquiredAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("HangfireLock", "core");
|
|
});
|
|
|
|
modelBuilder.Entity("Hangfire.EntityFrameworkCore.HangfireQueuedJob", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
|
|
|
b.Property<DateTime?>("FetchedAt")
|
|
.IsConcurrencyToken()
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<long>("JobId")
|
|
.HasColumnType("bigint");
|
|
|
|
b.Property<string>("Queue")
|
|
.IsRequired()
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("JobId");
|
|
|
|
b.HasIndex("Queue", "FetchedAt");
|
|
|
|
b.ToTable("HangfireQueuedJob", "core");
|
|
});
|
|
|
|
modelBuilder.Entity("Hangfire.EntityFrameworkCore.HangfireServer", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<DateTime>("Heartbeat")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Queues")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("StartedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<int>("WorkerCount")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Heartbeat");
|
|
|
|
b.ToTable("HangfireServer", "core");
|
|
});
|
|
|
|
modelBuilder.Entity("Hangfire.EntityFrameworkCore.HangfireSet", b =>
|
|
{
|
|
b.Property<string>("Key")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("character varying(100)");
|
|
|
|
b.Property<string>("Value")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<DateTime?>("ExpireAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<double>("Score")
|
|
.HasColumnType("double precision");
|
|
|
|
b.HasKey("Key", "Value");
|
|
|
|
b.HasIndex("ExpireAt");
|
|
|
|
b.HasIndex("Key", "Score");
|
|
|
|
b.ToTable("HangfireSet", "core");
|
|
});
|
|
|
|
modelBuilder.Entity("Hangfire.EntityFrameworkCore.HangfireState", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Data")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<long>("JobId")
|
|
.HasColumnType("bigint");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<string>("Reason")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("JobId");
|
|
|
|
b.ToTable("HangfireState", "core");
|
|
});
|
|
|
|
modelBuilder.Entity("Moonlight.ApiServer.Database.Entities.ApiKey", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTimeOffset>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTimeOffset>("ExpiresAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.PrimitiveCollection<string[]>("Permissions")
|
|
.IsRequired()
|
|
.HasColumnType("text[]");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("ApiKeys", "core");
|
|
});
|
|
|
|
modelBuilder.Entity("Moonlight.ApiServer.Database.Entities.Theme", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Author")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("DonateUrl")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("IsEnabled")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("UpdateUrl")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Version")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Themes", "core");
|
|
});
|
|
|
|
modelBuilder.Entity("Moonlight.ApiServer.Database.Entities.User", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Email")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Password")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.PrimitiveCollection<string[]>("Permissions")
|
|
.IsRequired()
|
|
.HasColumnType("text[]");
|
|
|
|
b.Property<DateTimeOffset>("TokenValidTimestamp")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Username")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Users", "core");
|
|
});
|
|
|
|
modelBuilder.Entity("Hangfire.EntityFrameworkCore.HangfireJob", b =>
|
|
{
|
|
b.HasOne("Hangfire.EntityFrameworkCore.HangfireState", "State")
|
|
.WithMany()
|
|
.HasForeignKey("StateId");
|
|
|
|
b.Navigation("State");
|
|
});
|
|
|
|
modelBuilder.Entity("Hangfire.EntityFrameworkCore.HangfireJobParameter", b =>
|
|
{
|
|
b.HasOne("Hangfire.EntityFrameworkCore.HangfireJob", "Job")
|
|
.WithMany("Parameters")
|
|
.HasForeignKey("JobId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Job");
|
|
});
|
|
|
|
modelBuilder.Entity("Hangfire.EntityFrameworkCore.HangfireQueuedJob", b =>
|
|
{
|
|
b.HasOne("Hangfire.EntityFrameworkCore.HangfireJob", "Job")
|
|
.WithMany("QueuedJobs")
|
|
.HasForeignKey("JobId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Job");
|
|
});
|
|
|
|
modelBuilder.Entity("Hangfire.EntityFrameworkCore.HangfireState", b =>
|
|
{
|
|
b.HasOne("Hangfire.EntityFrameworkCore.HangfireJob", "Job")
|
|
.WithMany("States")
|
|
.HasForeignKey("JobId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Job");
|
|
});
|
|
|
|
modelBuilder.Entity("Moonlight.ApiServer.Database.Entities.Theme", b =>
|
|
{
|
|
b.OwnsOne("Moonlight.ApiServer.Models.ApplicationTheme", "Content", b1 =>
|
|
{
|
|
b1.Property<int>("ThemeId")
|
|
.HasColumnType("integer");
|
|
|
|
b1.Property<float>("Border")
|
|
.HasColumnType("real");
|
|
|
|
b1.Property<string>("ColorAccent")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<string>("ColorAccentContent")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<string>("ColorBackground")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<string>("ColorBase100")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<string>("ColorBase150")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<string>("ColorBase200")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<string>("ColorBase250")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<string>("ColorBase300")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<string>("ColorBaseContent")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<string>("ColorError")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<string>("ColorErrorContent")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<string>("ColorInfo")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<string>("ColorInfoContent")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<string>("ColorNeutral")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<string>("ColorNeutralContent")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<string>("ColorPrimary")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<string>("ColorPrimaryContent")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<string>("ColorSecondary")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<string>("ColorSecondaryContent")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<string>("ColorSuccess")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<string>("ColorSuccessContent")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<string>("ColorWarning")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<string>("ColorWarningContent")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b1.Property<int>("Depth")
|
|
.HasColumnType("integer");
|
|
|
|
b1.Property<int>("Noise")
|
|
.HasColumnType("integer");
|
|
|
|
b1.Property<float>("RadiusBox")
|
|
.HasColumnType("real");
|
|
|
|
b1.Property<float>("RadiusField")
|
|
.HasColumnType("real");
|
|
|
|
b1.Property<float>("RadiusSelector")
|
|
.HasColumnType("real");
|
|
|
|
b1.Property<float>("SizeField")
|
|
.HasColumnType("real");
|
|
|
|
b1.Property<float>("SizeSelector")
|
|
.HasColumnType("real");
|
|
|
|
b1.HasKey("ThemeId");
|
|
|
|
b1.ToTable("Themes", "core");
|
|
|
|
b1.ToJson("Content");
|
|
|
|
b1.WithOwner()
|
|
.HasForeignKey("ThemeId");
|
|
});
|
|
|
|
b.Navigation("Content")
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Hangfire.EntityFrameworkCore.HangfireJob", b =>
|
|
{
|
|
b.Navigation("Parameters");
|
|
|
|
b.Navigation("QueuedJobs");
|
|
|
|
b.Navigation("States");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|