//
using DiscordApp.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace DiscordApp.Migrations
{
[DbContext(typeof(AppDbContext))]
[Migration("20231029140047_InitMigrate29")]
partial class InitMigrate29
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.13")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("DiscordApp.Database.Tables.ArtsPatents", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("Date")
.HasColumnType("bigint");
b.Property("Employee")
.IsRequired()
.HasColumnType("text");
b.Property("Name")
.IsRequired()
.HasColumnType("text");
b.Property("Number")
.IsRequired()
.HasColumnType("integer[]");
b.Property("Size")
.IsRequired()
.HasColumnType("text");
b.Property("isAllowedToResell")
.HasColumnType("boolean");
b.Property("passportId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("passportId");
b.ToTable("ArtsPatent", "public");
});
modelBuilder.Entity("DiscordApp.Database.Tables.Autobranches", b =>
{
b.Property("ChannelId")
.ValueGeneratedOnAdd()
.HasColumnType("numeric(20,0)");
b.Property("BranchName")
.IsRequired()
.HasColumnType("text");
b.HasKey("ChannelId");
b.ToTable("Autobranches", "public");
});
modelBuilder.Entity("DiscordApp.Database.Tables.BooksPatents", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("Annotation")
.IsRequired()
.HasColumnType("text");
b.Property("Date")
.HasColumnType("integer");
b.Property("Employee")
.IsRequired()
.HasColumnType("text");
b.Property("Janre")
.IsRequired()
.HasColumnType("text");
b.Property("Name")
.IsRequired()
.HasColumnType("text");
b.Property("isAllowedToResell")
.HasColumnType("boolean");
b.Property("passportId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("passportId");
b.ToTable("BooksPatent", "public");
});
modelBuilder.Entity("DiscordApp.Database.Tables.Passport", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("Applicant")
.IsRequired()
.HasColumnType("text");
b.Property("Date")
.HasColumnType("bigint");
b.Property("Employee")
.HasColumnType("numeric(20,0)");
b.Property("Gender")
.IsRequired()
.HasColumnType("text");
b.Property("RpName")
.IsRequired()
.HasColumnType("text");
b.Property("Support")
.HasColumnType("integer");
b.Property("birthDate")
.HasColumnType("bigint");
b.HasKey("Id");
b.ToTable("Passport", "public");
});
modelBuilder.Entity("DiscordApp.Database.Tables.ArtsPatents", b =>
{
b.HasOne("DiscordApp.Database.Tables.Passport", "passport")
.WithMany()
.HasForeignKey("passportId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("passport");
});
modelBuilder.Entity("DiscordApp.Database.Tables.BooksPatents", b =>
{
b.HasOne("DiscordApp.Database.Tables.Passport", "passport")
.WithMany()
.HasForeignKey("passportId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("passport");
});
#pragma warning restore 612, 618
}
}
}