139 lines
5.0 KiB
C#
139 lines
5.0 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
using WatchIt.Database;
|
|
|
|
#nullable disable
|
|
|
|
namespace WatchIt.Database.Migrations
|
|
{
|
|
[DbContext(typeof(DatabaseContext))]
|
|
partial class DatabaseContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "8.0.3")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("WatchIt.Database.Model.Account.Account", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
|
|
|
b.Property<Guid>("AccountProfilePictureId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTimeOffset>("CreationDate")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasDefaultValueSql("now()");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasMaxLength(1000)
|
|
.HasColumnType("character varying(1000)");
|
|
|
|
b.Property<string>("Email")
|
|
.IsRequired()
|
|
.HasMaxLength(320)
|
|
.HasColumnType("character varying(320)");
|
|
|
|
b.Property<bool>("IsAdmin")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTimeOffset>("LastActive")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasDefaultValueSql("now()");
|
|
|
|
b.Property<string>("LeftSalt")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("character varying(20)");
|
|
|
|
b.Property<byte[]>("Password")
|
|
.IsRequired()
|
|
.HasMaxLength(1000)
|
|
.HasColumnType("bytea");
|
|
|
|
b.Property<string>("RightSalt")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("character varying(20)");
|
|
|
|
b.Property<string>("Username")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("character varying(50)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AccountProfilePictureId")
|
|
.IsUnique();
|
|
|
|
b.HasIndex("Id")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Accounts");
|
|
});
|
|
|
|
modelBuilder.Entity("WatchIt.Database.Model.Account.AccountProfilePicture", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<byte[]>("Image")
|
|
.IsRequired()
|
|
.HasMaxLength(-1)
|
|
.HasColumnType("bytea");
|
|
|
|
b.Property<string>("MimeType")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("character varying(50)");
|
|
|
|
b.Property<DateTimeOffset>("UploadDate")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasDefaultValueSql("now()");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Id")
|
|
.IsUnique();
|
|
|
|
b.ToTable("AccountProfilePictures");
|
|
});
|
|
|
|
modelBuilder.Entity("WatchIt.Database.Model.Account.Account", b =>
|
|
{
|
|
b.HasOne("WatchIt.Database.Model.Account.AccountProfilePicture", "AccountProfilePicture")
|
|
.WithOne("Account")
|
|
.HasForeignKey("WatchIt.Database.Model.Account.Account", "AccountProfilePictureId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("AccountProfilePicture");
|
|
});
|
|
|
|
modelBuilder.Entity("WatchIt.Database.Model.Account.AccountProfilePicture", b =>
|
|
{
|
|
b.Navigation("Account")
|
|
.IsRequired();
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|