// using System; using AccountDatabaseImplement; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace AccountDatabaseImplement.Migrations { [DbContext(typeof(AccountDatabase))] partial class AccountDatabaseModelSnapshot : 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("AccountDatabaseImplement.Models.Account", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Login") .IsRequired() .HasColumnType("text"); b.Property("Rating") .HasColumnType("real"); b.Property("RoleId") .HasColumnType("integer"); b.Property("Warnings") .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("RoleId"); b.ToTable("Accounts"); }); modelBuilder.Entity("AccountDatabaseImplement.Models.Role", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("RoleName") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Roles"); }); modelBuilder.Entity("AccountDatabaseImplement.Models.Account", b => { b.HasOne("AccountDatabaseImplement.Models.Role", "Role") .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Role"); }); #pragma warning restore 612, 618 } } }