PIbd-31_Putincev.D.M._COP_29/COP/PortalAccountsDatabaseImplement/Migrations/PortalAccountsDatabaseModelSnapshot.cs

88 lines
3.0 KiB
C#

// <auto-generated />
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using PortalAccountsDatabaseImplement;
#nullable disable
namespace PortalAccountsDatabaseImplement.Migrations
{
[DbContext(typeof(PortalAccountsDatabase))]
partial class PortalAccountsDatabaseModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.11")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("PortalAccountsDatabaseImplement.Models.Account", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("AvatarPath")
.HasColumnType("text");
b.Property<string>("Email")
.HasColumnType("text");
b.Property<int>("InterestId")
.HasColumnType("integer");
b.Property<string>("Login")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("InterestId");
b.ToTable("Accounts");
});
modelBuilder.Entity("PortalAccountsDatabaseImplement.Models.Interest", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Interests");
});
modelBuilder.Entity("PortalAccountsDatabaseImplement.Models.Account", b =>
{
b.HasOne("PortalAccountsDatabaseImplement.Models.Interest", "Interest")
.WithMany("Accounts")
.HasForeignKey("InterestId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Interest");
});
modelBuilder.Entity("PortalAccountsDatabaseImplement.Models.Interest", b =>
{
b.Navigation("Accounts");
});
#pragma warning restore 612, 618
}
}
}