mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2026-02-20 15:56:57 -05:00
213 lines
7.7 KiB
C#
213 lines
7.7 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Cleanuparr.Persistence;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace Cleanuparr.Persistence.Migrations.Users
|
|
{
|
|
[DbContext(typeof(UsersContext))]
|
|
partial class UsersContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder.HasAnnotation("ProductVersion", "10.0.1");
|
|
|
|
modelBuilder.Entity("Cleanuparr.Persistence.Models.Auth.RecoveryCode", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<string>("CodeHash")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("code_hash");
|
|
|
|
b.Property<bool>("IsUsed")
|
|
.HasColumnType("INTEGER")
|
|
.HasColumnName("is_used");
|
|
|
|
b.Property<DateTime?>("UsedAt")
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("used_at");
|
|
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("user_id");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_recovery_codes");
|
|
|
|
b.HasIndex("UserId")
|
|
.HasDatabaseName("ix_recovery_codes_user_id");
|
|
|
|
b.ToTable("recovery_codes", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Cleanuparr.Persistence.Models.Auth.RefreshToken", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<DateTime>("ExpiresAt")
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("expires_at");
|
|
|
|
b.Property<DateTime?>("RevokedAt")
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("revoked_at");
|
|
|
|
b.Property<string>("TokenHash")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("token_hash");
|
|
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("user_id");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_refresh_tokens");
|
|
|
|
b.HasIndex("TokenHash")
|
|
.IsUnique()
|
|
.HasDatabaseName("ix_refresh_tokens_token_hash");
|
|
|
|
b.HasIndex("UserId")
|
|
.HasDatabaseName("ix_refresh_tokens_user_id");
|
|
|
|
b.ToTable("refresh_tokens", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Cleanuparr.Persistence.Models.Auth.User", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<string>("ApiKey")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("api_key");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<int>("FailedLoginAttempts")
|
|
.HasColumnType("INTEGER")
|
|
.HasColumnName("failed_login_attempts");
|
|
|
|
b.Property<DateTime?>("LockoutEnd")
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("lockout_end");
|
|
|
|
b.Property<string>("PasswordHash")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("password_hash");
|
|
|
|
b.Property<string>("PlexAccountId")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("plex_account_id");
|
|
|
|
b.Property<string>("PlexAuthToken")
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("plex_auth_token");
|
|
|
|
b.Property<string>("PlexEmail")
|
|
.HasMaxLength(200)
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("plex_email");
|
|
|
|
b.Property<string>("PlexUsername")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("plex_username");
|
|
|
|
b.Property<bool>("SetupCompleted")
|
|
.HasColumnType("INTEGER")
|
|
.HasColumnName("setup_completed");
|
|
|
|
b.Property<bool>("TotpEnabled")
|
|
.HasColumnType("INTEGER")
|
|
.HasColumnName("totp_enabled");
|
|
|
|
b.Property<string>("TotpSecret")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("totp_secret");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.Property<string>("Username")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("username");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk_users");
|
|
|
|
b.HasIndex("ApiKey")
|
|
.IsUnique()
|
|
.HasDatabaseName("ix_users_api_key");
|
|
|
|
b.HasIndex("Username")
|
|
.IsUnique()
|
|
.HasDatabaseName("ix_users_username");
|
|
|
|
b.ToTable("users", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Cleanuparr.Persistence.Models.Auth.RecoveryCode", b =>
|
|
{
|
|
b.HasOne("Cleanuparr.Persistence.Models.Auth.User", "User")
|
|
.WithMany("RecoveryCodes")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_recovery_codes_users_user_id");
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("Cleanuparr.Persistence.Models.Auth.RefreshToken", b =>
|
|
{
|
|
b.HasOne("Cleanuparr.Persistence.Models.Auth.User", "User")
|
|
.WithMany("RefreshTokens")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired()
|
|
.HasConstraintName("fk_refresh_tokens_users_user_id");
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("Cleanuparr.Persistence.Models.Auth.User", b =>
|
|
{
|
|
b.Navigation("RecoveryCodes");
|
|
|
|
b.Navigation("RefreshTokens");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|