115 lines
3.8 KiB
C#
115 lines
3.8 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
using SimpleTodoApiWithPg.Data;
|
|
|
|
#nullable disable
|
|
|
|
namespace SimpleTodoApiWithPg.Migrations
|
|
{
|
|
[DbContext(typeof(AppDbContext))]
|
|
partial class AppDbContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "9.0.9")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("SimpleTodoApiWithPg.Models.RefreshToken", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("Created")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<DateTime>("Expires")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<DateTime?>("Revoked")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Token")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("RefreshTokens");
|
|
});
|
|
|
|
modelBuilder.Entity("SimpleTodoApiWithPg.Models.Todo", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<bool>("IsCompleted")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Todos");
|
|
});
|
|
|
|
modelBuilder.Entity("SimpleTodoApiWithPg.Models.User", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Email")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("character varying(50)");
|
|
|
|
b.Property<string>("PasswordHash")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("character varying(100)");
|
|
|
|
b.Property<string>("Username")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("character varying(50)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Users");
|
|
});
|
|
|
|
modelBuilder.Entity("SimpleTodoApiWithPg.Models.RefreshToken", b =>
|
|
{
|
|
b.HasOne("SimpleTodoApiWithPg.Models.User", "User")
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("User");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|