//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using SharpbinV3.Server.Data;
#nullable disable
namespace SharpbinV3.Server.Migrations
{
[DbContext(typeof(AppDbContext))]
partial class AppDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "10.0.0");
modelBuilder.Entity("SharpbinV3.Server.Data.Entities.Paste", b =>
{
b.Property("PID")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AuthorUUID")
.HasColumnType("TEXT");
b.Property("Content")
.IsRequired()
.HasColumnType("BLOB");
b.Property("EditedAt")
.HasColumnType("INTEGER");
b.Property("ExpiresAt")
.HasColumnType("INTEGER");
b.Property("ID")
.HasColumnType("TEXT");
b.Property("IsCompressed")
.HasColumnType("INTEGER");
b.Property("Size")
.HasColumnType("INTEGER");
b.Property("Syntax")
.HasColumnType("TEXT");
b.Property("Title")
.HasColumnType("TEXT");
b.Property("TrueSize")
.HasColumnType("INTEGER");
b.Property("UUID")
.HasColumnType("TEXT");
b.Property("Views")
.HasColumnType("INTEGER");
b.Property("Visibility")
.HasColumnType("INTEGER");
b.HasKey("PID");
b.HasIndex("AuthorUUID");
b.HasIndex("ExpiresAt");
b.HasIndex("ID")
.IsUnique();
b.HasIndex("PID")
.IsUnique();
b.HasIndex("UUID")
.IsUnique();
b.HasIndex("Views");
b.HasIndex("Visibility");
b.ToTable("Pastes");
});
modelBuilder.Entity("SharpbinV3.Server.Data.Entities.RefreshToken", b =>
{
b.Property("UserUUID")
.HasColumnType("TEXT");
b.Property("CreatedAt")
.HasColumnType("INTEGER");
b.Property("ExpiresAt")
.HasColumnType("INTEGER");
b.Property("JwtId")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Token")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Used")
.HasColumnType("INTEGER");
b.HasKey("UserUUID");
b.ToTable("RefreshTokens");
});
modelBuilder.Entity("SharpbinV3.Server.Data.Entities.User", b =>
{
b.Property("UUID")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("DisplayName")
.HasColumnType("TEXT");
b.Property("Email")
.HasColumnType("TEXT");
b.Property("LastLogin")
.HasColumnType("INTEGER");
b.Property("PasswordHash")
.IsRequired()
.HasColumnType("TEXT");
b.PrimitiveCollection("Roles")
.IsRequired()
.HasColumnType("TEXT");
b.Property("UID")
.HasColumnType("INTEGER");
b.Property("Username")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Visibility")
.HasColumnType("INTEGER");
b.HasKey("UUID");
b.HasIndex("UUID")
.IsUnique();
b.ToTable("Users");
});
modelBuilder.Entity("SharpbinV3.Server.Data.Entities.Paste", b =>
{
b.HasOne("SharpbinV3.Server.Data.Entities.User", "User")
.WithMany("Pastes")
.HasForeignKey("AuthorUUID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("User");
});
modelBuilder.Entity("SharpbinV3.Server.Data.Entities.RefreshToken", b =>
{
b.HasOne("SharpbinV3.Server.Data.Entities.User", "User")
.WithMany("RefreshTokens")
.HasForeignKey("UserUUID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("User");
});
modelBuilder.Entity("SharpbinV3.Server.Data.Entities.User", b =>
{
b.Navigation("Pastes");
b.Navigation("RefreshTokens");
});
#pragma warning restore 612, 618
}
}
}