mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
195 lines
5.9 KiB
C#
195 lines
5.9 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using SharpbinV3.Data;
|
|
|
|
#nullable disable
|
|
|
|
namespace SharpbinV3.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.Data.Entities.Paste", b =>
|
|
{
|
|
b.Property<int>("PID")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("AuthorUUID")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<long?>("EditedAt")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<long>("ExpiresAt")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("FilePath")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("ID")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("Size")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Syntax")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Title")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("TrueSize")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("UUID")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int?>("UserUID")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("Views")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("Visiblity")
|
|
.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("UserUID");
|
|
|
|
b.HasIndex("Views");
|
|
|
|
b.HasIndex("Visiblity");
|
|
|
|
b.ToTable("Pastes");
|
|
});
|
|
|
|
modelBuilder.Entity("SharpbinV3.Data.Entities.RefreshToken", b =>
|
|
{
|
|
b.Property<Guid>("UserUUID")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<long>("CreatedAt")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<long>("ExpiresAt")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("JwtId")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Token")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("Used")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int?>("UserUID")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("UserUUID");
|
|
|
|
b.HasIndex("UserUID");
|
|
|
|
b.ToTable("RefreshTokens");
|
|
});
|
|
|
|
modelBuilder.Entity("SharpbinV3.Data.Entities.User", b =>
|
|
{
|
|
b.Property<int>("UID")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("DisplayName")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Email")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<long?>("LastLogin")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("PasswordHash")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.PrimitiveCollection<string>("Roles")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<Guid>("UUID")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Username")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("Visiblity")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("UID");
|
|
|
|
b.HasIndex("UID")
|
|
.IsUnique();
|
|
|
|
b.HasIndex("UUID")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Users");
|
|
});
|
|
|
|
modelBuilder.Entity("SharpbinV3.Data.Entities.Paste", b =>
|
|
{
|
|
b.HasOne("SharpbinV3.Data.Entities.User", "User")
|
|
.WithMany("Pastes")
|
|
.HasForeignKey("UserUID");
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("SharpbinV3.Data.Entities.RefreshToken", b =>
|
|
{
|
|
b.HasOne("SharpbinV3.Data.Entities.User", "User")
|
|
.WithMany()
|
|
.HasForeignKey("UserUID");
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("SharpbinV3.Data.Entities.User", b =>
|
|
{
|
|
b.Navigation("Pastes");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|