Files
ClubPenguinServer/MareSynchronosServer/MareSynchronosServer/Migrations/20220713104127_AddIndexes.Designer.cs
2022-07-13 14:05:42 +02:00

201 lines
6.8 KiB
C#

// <auto-generated />
using System;
using MareSynchronosServer.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace MareSynchronosServer.Migrations
{
[DbContext(typeof(MareDbContext))]
[Migration("20220713104127_AddIndexes")]
partial class AddIndexes
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.6")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
modelBuilder.Entity("MareSynchronosServer.Models.Auth", b =>
{
b.Property<string>("HashedKey")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("UserUID")
.HasColumnType("nvarchar(10)");
b.HasKey("HashedKey");
b.HasIndex("UserUID");
b.ToTable("Auth", (string)null);
});
modelBuilder.Entity("MareSynchronosServer.Models.Banned", b =>
{
b.Property<string>("CharacterIdentification")
.HasColumnType("nvarchar(450)");
b.Property<string>("Reason")
.HasColumnType("nvarchar(max)");
b.Property<byte[]>("Timestamp")
.IsConcurrencyToken()
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("rowversion");
b.HasKey("CharacterIdentification");
b.ToTable("BannedUsers", (string)null);
});
modelBuilder.Entity("MareSynchronosServer.Models.ClientPair", b =>
{
b.Property<string>("UserUID")
.HasMaxLength(10)
.HasColumnType("nvarchar(10)");
b.Property<string>("OtherUserUID")
.HasMaxLength(10)
.HasColumnType("nvarchar(10)");
b.Property<bool>("AllowReceivingMessages")
.HasColumnType("bit");
b.Property<bool>("IsPaused")
.HasColumnType("bit");
b.Property<byte[]>("Timestamp")
.IsConcurrencyToken()
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("rowversion");
b.HasKey("UserUID", "OtherUserUID");
b.HasIndex("OtherUserUID");
b.HasIndex("UserUID");
b.ToTable("ClientPairs", (string)null);
});
modelBuilder.Entity("MareSynchronosServer.Models.FileCache", b =>
{
b.Property<string>("Hash")
.HasMaxLength(40)
.HasColumnType("nvarchar(40)");
b.Property<byte[]>("Timestamp")
.IsConcurrencyToken()
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("rowversion");
b.Property<bool>("Uploaded")
.HasColumnType("bit");
b.Property<string>("UploaderUID")
.HasColumnType("nvarchar(10)");
b.HasKey("Hash");
b.HasIndex("UploaderUID");
b.ToTable("FileCaches", (string)null);
});
modelBuilder.Entity("MareSynchronosServer.Models.ForbiddenUploadEntry", b =>
{
b.Property<string>("Hash")
.HasMaxLength(40)
.HasColumnType("nvarchar(40)");
b.Property<string>("ForbiddenBy")
.HasColumnType("nvarchar(max)");
b.Property<byte[]>("Timestamp")
.IsConcurrencyToken()
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("rowversion");
b.HasKey("Hash");
b.ToTable("ForbiddenUploadEntries", (string)null);
});
modelBuilder.Entity("MareSynchronosServer.Models.User", b =>
{
b.Property<string>("UID")
.HasMaxLength(10)
.HasColumnType("nvarchar(10)");
b.Property<string>("CharacterIdentification")
.HasColumnType("nvarchar(450)");
b.Property<bool>("IsAdmin")
.HasColumnType("bit");
b.Property<bool>("IsModerator")
.HasColumnType("bit");
b.Property<byte[]>("Timestamp")
.IsConcurrencyToken()
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("rowversion");
b.HasKey("UID");
b.HasIndex("CharacterIdentification");
b.ToTable("Users", (string)null);
});
modelBuilder.Entity("MareSynchronosServer.Models.Auth", b =>
{
b.HasOne("MareSynchronosServer.Models.User", "User")
.WithMany()
.HasForeignKey("UserUID");
b.Navigation("User");
});
modelBuilder.Entity("MareSynchronosServer.Models.ClientPair", b =>
{
b.HasOne("MareSynchronosServer.Models.User", "OtherUser")
.WithMany()
.HasForeignKey("OtherUserUID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("MareSynchronosServer.Models.User", "User")
.WithMany()
.HasForeignKey("UserUID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("OtherUser");
b.Navigation("User");
});
modelBuilder.Entity("MareSynchronosServer.Models.FileCache", b =>
{
b.HasOne("MareSynchronosServer.Models.User", "Uploader")
.WithMany()
.HasForeignKey("UploaderUID");
b.Navigation("Uploader");
});
#pragma warning restore 612, 618
}
}
}