diff --git a/SharpbinV3.Server/Migrations/20260310072309_CorrectNamespaceRename.Designer.cs b/SharpbinV3.Server/Migrations/20260310072309_CorrectNamespaceRename.Designer.cs
new file mode 100644
index 0000000..02cac07
--- /dev/null
+++ b/SharpbinV3.Server/Migrations/20260310072309_CorrectNamespaceRename.Designer.cs
@@ -0,0 +1,455 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using SharpbinV3.Server.Data;
+
+#nullable disable
+
+namespace SharpbinV3.Server.Migrations
+{
+ [DbContext(typeof(AppDbContext))]
+ [Migration("20260310072309_CorrectNamespaceRename")]
+ partial class CorrectNamespaceRename
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder.HasAnnotation("ProductVersion", "10.0.3");
+
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.ApiKey", b =>
+ {
+ b.Property("UUID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedAt")
+ .HasColumnType("INTEGER");
+
+ b.Property("KeyHash")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("LastUsedAt")
+ .HasColumnType("INTEGER");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("UserUUID")
+ .HasColumnType("TEXT");
+
+ b.HasKey("UUID");
+
+ b.HasIndex("UserUUID");
+
+ b.ToTable("ApiKeys");
+ });
+
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.EmailVerificationToken", b =>
+ {
+ b.Property("UUID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedAt")
+ .HasColumnType("INTEGER");
+
+ b.Property("ExpiresAt")
+ .HasColumnType("INTEGER");
+
+ b.Property("TokenHash")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("Type")
+ .HasColumnType("INTEGER");
+
+ b.Property("Used")
+ .HasColumnType("INTEGER");
+
+ b.Property("UserUUID")
+ .HasColumnType("TEXT");
+
+ b.HasKey("UUID");
+
+ b.HasIndex("UserUUID");
+
+ b.ToTable("EmailVerificationTokens");
+ });
+
+ 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("CreatedAt")
+ .HasColumnType("INTEGER");
+
+ 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("Size");
+
+ b.HasIndex("Syntax");
+
+ b.HasIndex("UUID")
+ .IsUnique();
+
+ b.HasIndex("Views");
+
+ b.HasIndex("Visibility");
+
+ b.ToTable("Pastes");
+ });
+
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.PasteView", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("PastePID")
+ .HasColumnType("INTEGER");
+
+ b.Property("ViewedAt")
+ .HasColumnType("INTEGER");
+
+ b.Property("ViewerHash")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("PastePID", "ViewerHash")
+ .IsUnique();
+
+ b.ToTable("PasteViews");
+ });
+
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.RefreshToken", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property("ExpiresAt")
+ .HasColumnType("TEXT");
+
+ b.Property("JwtId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("ReplacedByToken")
+ .HasColumnType("TEXT");
+
+ b.Property("Revoked")
+ .HasColumnType("INTEGER");
+
+ b.Property("RowVersion")
+ .IsRequired()
+ .HasColumnType("BLOB");
+
+ b.Property("TokenHash")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("Used")
+ .HasColumnType("INTEGER");
+
+ b.Property("UserUUID")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TokenHash")
+ .IsUnique();
+
+ b.HasIndex("UserUUID");
+
+ b.ToTable("RefreshTokens");
+ });
+
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.Report", b =>
+ {
+ b.Property("ReportID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CreatedAt")
+ .HasColumnType("INTEGER");
+
+ b.Property("Description")
+ .HasMaxLength(1000)
+ .HasColumnType("TEXT");
+
+ b.Property("PastePID")
+ .HasColumnType("INTEGER");
+
+ b.Property("ReporterUUID")
+ .HasColumnType("TEXT");
+
+ b.Property("Status")
+ .HasColumnType("INTEGER");
+
+ b.Property("TargetType")
+ .HasColumnType("INTEGER");
+
+ b.Property("Type")
+ .HasColumnType("INTEGER");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("INTEGER");
+
+ b.Property("UserUUID")
+ .HasColumnType("TEXT");
+
+ b.HasKey("ReportID");
+
+ b.HasIndex("PastePID");
+
+ b.HasIndex("ReportID")
+ .IsUnique();
+
+ b.HasIndex("ReporterUUID");
+
+ b.HasIndex("TargetType");
+
+ b.HasIndex("UserUUID");
+
+ b.ToTable("Reports");
+ });
+
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.User", b =>
+ {
+ b.Property("UUID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedAt")
+ .HasColumnType("INTEGER");
+
+ b.Property("DisplayName")
+ .HasColumnType("TEXT");
+
+ b.Property("Email")
+ .HasColumnType("TEXT");
+
+ b.Property("EmailVerified")
+ .HasColumnType("INTEGER");
+
+ b.Property("IsBanned")
+ .HasColumnType("INTEGER");
+
+ b.Property("LastLogin")
+ .HasColumnType("INTEGER");
+
+ b.Property("PasswordHash")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("Roles")
+ .HasColumnType("INTEGER");
+
+ b.Property("UID")
+ .HasColumnType("INTEGER");
+
+ b.Property("Username")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("Visibility")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("UUID");
+
+ b.HasIndex("UID");
+
+ b.HasIndex("UUID")
+ .IsUnique();
+
+ b.ToTable("Users");
+ });
+
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.UserTotp", b =>
+ {
+ b.Property("UserUUID")
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedAt")
+ .HasColumnType("INTEGER");
+
+ b.Property("EncryptedSecret")
+ .IsRequired()
+ .HasColumnType("BLOB");
+
+ b.HasKey("UserUUID");
+
+ b.ToTable("UserTotps");
+ });
+
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.ApiKey", b =>
+ {
+ b.HasOne("SharpbinV3.Server.Data.Entities.User", "User")
+ .WithMany("ApiKeys")
+ .HasForeignKey("UserUUID")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.EmailVerificationToken", b =>
+ {
+ b.HasOne("SharpbinV3.Server.Data.Entities.User", "User")
+ .WithMany("EmailVerificationTokens")
+ .HasForeignKey("UserUUID")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.Paste", b =>
+ {
+ b.HasOne("SharpbinV3.Server.Data.Entities.User", "User")
+ .WithMany("Pastes")
+ .HasForeignKey("AuthorUUID")
+ .OnDelete(DeleteBehavior.Cascade);
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.PasteView", b =>
+ {
+ b.HasOne("SharpbinV3.Server.Data.Entities.Paste", "Paste")
+ .WithMany("PasteViews")
+ .HasForeignKey("PastePID")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Paste");
+ });
+
+ 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.Report", b =>
+ {
+ b.HasOne("SharpbinV3.Server.Data.Entities.Paste", "Paste")
+ .WithMany("Reports")
+ .HasForeignKey("PastePID")
+ .OnDelete(DeleteBehavior.SetNull);
+
+ b.HasOne("SharpbinV3.Server.Data.Entities.User", "User")
+ .WithMany("Reports")
+ .HasForeignKey("UserUUID")
+ .OnDelete(DeleteBehavior.SetNull);
+
+ b.Navigation("Paste");
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.UserTotp", b =>
+ {
+ b.HasOne("SharpbinV3.Server.Data.Entities.User", "User")
+ .WithOne("Totp")
+ .HasForeignKey("SharpbinV3.Server.Data.Entities.UserTotp", "UserUUID")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.Paste", b =>
+ {
+ b.Navigation("PasteViews");
+
+ b.Navigation("Reports");
+ });
+
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.User", b =>
+ {
+ b.Navigation("ApiKeys");
+
+ b.Navigation("EmailVerificationTokens");
+
+ b.Navigation("Pastes");
+
+ b.Navigation("RefreshTokens");
+
+ b.Navigation("Reports");
+
+ b.Navigation("Totp");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/SharpbinV3.Server/Migrations/20260310072309_CorrectNamespaceRename.cs b/SharpbinV3.Server/Migrations/20260310072309_CorrectNamespaceRename.cs
new file mode 100644
index 0000000..19f44fe
--- /dev/null
+++ b/SharpbinV3.Server/Migrations/20260310072309_CorrectNamespaceRename.cs
@@ -0,0 +1,22 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace SharpbinV3.Server.Migrations
+{
+ ///
+ public partial class CorrectNamespaceRename : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+
+ }
+ }
+}
diff --git a/SharpbinV3.Server/Migrations/AppDbContextModelSnapshot.cs b/SharpbinV3.Server/Migrations/AppDbContextModelSnapshot.cs
index f904630..8660c80 100644
--- a/SharpbinV3.Server/Migrations/AppDbContextModelSnapshot.cs
+++ b/SharpbinV3.Server/Migrations/AppDbContextModelSnapshot.cs
@@ -17,7 +17,7 @@ namespace SharpbinV3.Server.Migrations
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "10.0.3");
- modelBuilder.Entity("SharpbinV3.Server.Data.Enums.ApiKey", b =>
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.ApiKey", b =>
{
b.Property("UUID")
.ValueGeneratedOnAdd()
@@ -47,7 +47,7 @@ namespace SharpbinV3.Server.Migrations
b.ToTable("ApiKeys");
});
- modelBuilder.Entity("SharpbinV3.Server.Data.Enums.EmailVerificationToken", b =>
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.EmailVerificationToken", b =>
{
b.Property("UUID")
.ValueGeneratedOnAdd()
@@ -79,7 +79,7 @@ namespace SharpbinV3.Server.Migrations
b.ToTable("EmailVerificationTokens");
});
- modelBuilder.Entity("SharpbinV3.Server.Data.Enums.Paste", b =>
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.Paste", b =>
{
b.Property("PID")
.ValueGeneratedOnAdd()
@@ -154,7 +154,7 @@ namespace SharpbinV3.Server.Migrations
b.ToTable("Pastes");
});
- modelBuilder.Entity("SharpbinV3.Server.Data.Enums.PasteView", b =>
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.PasteView", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
@@ -179,7 +179,7 @@ namespace SharpbinV3.Server.Migrations
b.ToTable("PasteViews");
});
- modelBuilder.Entity("SharpbinV3.Server.Data.Enums.RefreshToken", b =>
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.RefreshToken", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
@@ -225,7 +225,7 @@ namespace SharpbinV3.Server.Migrations
b.ToTable("RefreshTokens");
});
- modelBuilder.Entity("SharpbinV3.Server.Data.Enums.Report", b =>
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.Report", b =>
{
b.Property("ReportID")
.ValueGeneratedOnAdd()
@@ -275,7 +275,7 @@ namespace SharpbinV3.Server.Migrations
b.ToTable("Reports");
});
- modelBuilder.Entity("SharpbinV3.Server.Data.Enums.User", b =>
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.User", b =>
{
b.Property("UUID")
.ValueGeneratedOnAdd()
@@ -326,7 +326,7 @@ namespace SharpbinV3.Server.Migrations
b.ToTable("Users");
});
- modelBuilder.Entity("SharpbinV3.Server.Data.Enums.UserTotp", b =>
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.UserTotp", b =>
{
b.Property("UserUUID")
.HasColumnType("TEXT");
@@ -343,9 +343,9 @@ namespace SharpbinV3.Server.Migrations
b.ToTable("UserTotps");
});
- modelBuilder.Entity("SharpbinV3.Server.Data.Enums.ApiKey", b =>
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.ApiKey", b =>
{
- b.HasOne("SharpbinV3.Server.Data.Enums.User", "User")
+ b.HasOne("SharpbinV3.Server.Data.Entities.User", "User")
.WithMany("ApiKeys")
.HasForeignKey("UserUUID")
.OnDelete(DeleteBehavior.Cascade)
@@ -354,9 +354,9 @@ namespace SharpbinV3.Server.Migrations
b.Navigation("User");
});
- modelBuilder.Entity("SharpbinV3.Server.Data.Enums.EmailVerificationToken", b =>
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.EmailVerificationToken", b =>
{
- b.HasOne("SharpbinV3.Server.Data.Enums.User", "User")
+ b.HasOne("SharpbinV3.Server.Data.Entities.User", "User")
.WithMany("EmailVerificationTokens")
.HasForeignKey("UserUUID")
.OnDelete(DeleteBehavior.Cascade)
@@ -365,9 +365,9 @@ namespace SharpbinV3.Server.Migrations
b.Navigation("User");
});
- modelBuilder.Entity("SharpbinV3.Server.Data.Enums.Paste", b =>
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.Paste", b =>
{
- b.HasOne("SharpbinV3.Server.Data.Enums.User", "User")
+ b.HasOne("SharpbinV3.Server.Data.Entities.User", "User")
.WithMany("Pastes")
.HasForeignKey("AuthorUUID")
.OnDelete(DeleteBehavior.Cascade);
@@ -375,9 +375,9 @@ namespace SharpbinV3.Server.Migrations
b.Navigation("User");
});
- modelBuilder.Entity("SharpbinV3.Server.Data.Enums.PasteView", b =>
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.PasteView", b =>
{
- b.HasOne("SharpbinV3.Server.Data.Enums.Paste", "Paste")
+ b.HasOne("SharpbinV3.Server.Data.Entities.Paste", "Paste")
.WithMany("PasteViews")
.HasForeignKey("PastePID")
.OnDelete(DeleteBehavior.Cascade)
@@ -386,9 +386,9 @@ namespace SharpbinV3.Server.Migrations
b.Navigation("Paste");
});
- modelBuilder.Entity("SharpbinV3.Server.Data.Enums.RefreshToken", b =>
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.RefreshToken", b =>
{
- b.HasOne("SharpbinV3.Server.Data.Enums.User", "User")
+ b.HasOne("SharpbinV3.Server.Data.Entities.User", "User")
.WithMany("RefreshTokens")
.HasForeignKey("UserUUID")
.OnDelete(DeleteBehavior.Cascade)
@@ -397,14 +397,14 @@ namespace SharpbinV3.Server.Migrations
b.Navigation("User");
});
- modelBuilder.Entity("SharpbinV3.Server.Data.Enums.Report", b =>
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.Report", b =>
{
- b.HasOne("SharpbinV3.Server.Data.Enums.Paste", "Paste")
+ b.HasOne("SharpbinV3.Server.Data.Entities.Paste", "Paste")
.WithMany("Reports")
.HasForeignKey("PastePID")
.OnDelete(DeleteBehavior.SetNull);
- b.HasOne("SharpbinV3.Server.Data.Enums.User", "User")
+ b.HasOne("SharpbinV3.Server.Data.Entities.User", "User")
.WithMany("Reports")
.HasForeignKey("UserUUID")
.OnDelete(DeleteBehavior.SetNull);
@@ -414,25 +414,25 @@ namespace SharpbinV3.Server.Migrations
b.Navigation("User");
});
- modelBuilder.Entity("SharpbinV3.Server.Data.Enums.UserTotp", b =>
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.UserTotp", b =>
{
- b.HasOne("SharpbinV3.Server.Data.Enums.User", "User")
+ b.HasOne("SharpbinV3.Server.Data.Entities.User", "User")
.WithOne("Totp")
- .HasForeignKey("SharpbinV3.Server.Data.Enums.UserTotp", "UserUUID")
+ .HasForeignKey("SharpbinV3.Server.Data.Entities.UserTotp", "UserUUID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("User");
});
- modelBuilder.Entity("SharpbinV3.Server.Data.Enums.Paste", b =>
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.Paste", b =>
{
b.Navigation("PasteViews");
b.Navigation("Reports");
});
- modelBuilder.Entity("SharpbinV3.Server.Data.Enums.User", b =>
+ modelBuilder.Entity("SharpbinV3.Server.Data.Entities.User", b =>
{
b.Navigation("ApiKeys");