//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using yawaflua.ru.Models;
#nullable disable
namespace yawaflua.ru.Migrations
{
[DbContext(typeof(AppDbContext))]
[Migration("20240315193302_Migrate_22_32__15_03_2024")]
partial class Migrate_22_32__15_03_2024
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.12")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("api.yawaflua.ru.Models.Tables.Projects", b =>
{
b.Property("id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("id"));
b.Property("description")
.IsRequired()
.HasColumnType("text");
b.Property("image")
.IsRequired()
.HasColumnType("text");
b.Property("name")
.IsRequired()
.HasColumnType("text");
b.Property("url")
.IsRequired()
.HasColumnType("text");
b.HasKey("id");
b.ToTable("Projects");
});
modelBuilder.Entity("yawaflua.ru.Database.Tables.ApiKey", b =>
{
b.Property("Key")
.HasColumnType("text");
b.Property("DiscordOwnerId")
.HasColumnType("numeric(20,0)");
b.Property("Melon")
.IsRequired()
.HasColumnType("text");
b.Property("Type")
.HasColumnType("integer");
b.HasKey("Key");
b.ToTable("ApiKeys", "public");
});
modelBuilder.Entity("yawaflua.ru.Models.Tables.Blogs", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("Annotation")
.IsRequired()
.HasColumnType("text");
b.Property("ImageUrl")
.HasColumnType("text");
b.Property("Text")
.IsRequired()
.HasColumnType("text");
b.Property("Title")
.IsRequired()
.HasColumnType("text");
b.Property("authorId")
.IsRequired()
.HasColumnType("text");
b.Property("authorNickname")
.IsRequired()
.HasColumnType("text");
b.Property("dateTime")
.HasColumnType("timestamp without time zone");
b.HasKey("Id");
b.ToTable("Blogs", "public");
});
modelBuilder.Entity("yawaflua.ru.Models.Tables.Comments", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("Text")
.IsRequired()
.HasColumnType("text");
b.Property("creatorMail")
.IsRequired()
.HasColumnType("text");
b.Property("dateTime")
.HasColumnType("bigint");
b.Property("postId")
.HasColumnType("integer");
b.HasKey("Id");
b.ToTable("Comments", "public");
});
modelBuilder.Entity("yawaflua.ru.Models.Tables.Redirects", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("redirectTo")
.HasColumnType("text");
b.Property("uri")
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Redirects");
});
#pragma warning restore 612, 618
}
}
}