//
using System;
using IOL.BookmarkThing.Server.Models.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace IOL.BookmarkThing.Server.Migrations
{
[DbContext(typeof(AppDbContext))]
partial class AppDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.1")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("IOL.BookmarkThing.Server.Models.Database.AccessToken", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property("AllowCreate")
.HasColumnType("boolean")
.HasColumnName("allow_create");
b.Property("AllowDelete")
.HasColumnType("boolean")
.HasColumnName("allow_delete");
b.Property("AllowRead")
.HasColumnType("boolean")
.HasColumnName("allow_read");
b.Property("AllowUpdate")
.HasColumnType("boolean")
.HasColumnName("allow_update");
b.Property("Created")
.HasColumnType("timestamp with time zone")
.HasColumnName("created");
b.Property("ExpiryDate")
.HasColumnType("timestamp with time zone")
.HasColumnName("expiry_date");
b.Property("UserId")
.HasColumnType("uuid")
.HasColumnName("user_id");
b.HasKey("Id")
.HasName("pk_access_tokens");
b.HasIndex("UserId")
.HasDatabaseName("ix_access_tokens_user_id");
b.ToTable("access_tokens", (string)null);
});
modelBuilder.Entity("IOL.BookmarkThing.Server.Models.Database.Entry", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property("Created")
.HasColumnType("timestamp with time zone")
.HasColumnName("created");
b.Property("Description")
.HasColumnType("text")
.HasColumnName("description");
b.Property("Tags")
.HasColumnType("text")
.HasColumnName("tags");
b.Property("Url")
.HasColumnType("text")
.HasColumnName("url");
b.Property("UserId")
.HasColumnType("uuid")
.HasColumnName("user_id");
b.HasKey("Id")
.HasName("pk_entries");
b.ToTable("entries", (string)null);
});
modelBuilder.Entity("IOL.BookmarkThing.Server.Models.Database.User", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property("Created")
.HasColumnType("timestamp with time zone")
.HasColumnName("created");
b.Property("Password")
.HasColumnType("text")
.HasColumnName("password");
b.Property("Username")
.HasColumnType("text")
.HasColumnName("username");
b.HasKey("Id")
.HasName("pk_users");
b.ToTable("users", (string)null);
});
modelBuilder.Entity("IOL.BookmarkThing.Server.Models.Database.AccessToken", b =>
{
b.HasOne("IOL.BookmarkThing.Server.Models.Database.User", "User")
.WithMany()
.HasForeignKey("UserId")
.HasConstraintName("fk_access_tokens_users_user_id");
b.Navigation("User");
});
#pragma warning restore 612, 618
}
}
}