116 lines
3.9 KiB
C#
116 lines
3.9 KiB
C#
|
// <auto-generated />
|
|||
|
using AccountsDataBaseImplement;
|
|||
|
using Microsoft.EntityFrameworkCore;
|
|||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace AccountsDataBaseImplement.Migrations
|
|||
|
{
|
|||
|
[DbContext(typeof(AccountsDatabase))]
|
|||
|
partial class AccountsDatabaseModelSnapshot : ModelSnapshot
|
|||
|
{
|
|||
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|||
|
{
|
|||
|
#pragma warning disable 612, 618
|
|||
|
modelBuilder
|
|||
|
.HasAnnotation("ProductVersion", "7.0.3")
|
|||
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|||
|
|
|||
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|||
|
|
|||
|
modelBuilder.Entity("AccountsDataBaseImplement.Models.Account", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("integer");
|
|||
|
|
|||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<string>("Email")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("text");
|
|||
|
|
|||
|
b.Property<string>("Login")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("text");
|
|||
|
|
|||
|
b.Property<string>("Password")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("text");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.ToTable("Accounts");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("AccountsDataBaseImplement.Models.AccountInterest", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("integer");
|
|||
|
|
|||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<int>("AccountId")
|
|||
|
.HasColumnType("integer");
|
|||
|
|
|||
|
b.Property<int>("InterestId")
|
|||
|
.HasColumnType("integer");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.HasIndex("AccountId");
|
|||
|
|
|||
|
b.HasIndex("InterestId");
|
|||
|
|
|||
|
b.ToTable("AccountInterests");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("AccountsDataBaseImplement.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("AccountsDataBaseImplement.Models.AccountInterest", b =>
|
|||
|
{
|
|||
|
b.HasOne("AccountsDataBaseImplement.Models.Account", "Account")
|
|||
|
.WithMany("Interests")
|
|||
|
.HasForeignKey("AccountId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.HasOne("AccountsDataBaseImplement.Models.Interest", "Interest")
|
|||
|
.WithMany()
|
|||
|
.HasForeignKey("InterestId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.Navigation("Account");
|
|||
|
|
|||
|
b.Navigation("Interest");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("AccountsDataBaseImplement.Models.Account", b =>
|
|||
|
{
|
|||
|
b.Navigation("Interests");
|
|||
|
});
|
|||
|
#pragma warning restore 612, 618
|
|||
|
}
|
|||
|
}
|
|||
|
}
|