123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- // <auto-generated />
- using System;
- using AvaloniaApplication2.Models;
- using Microsoft.EntityFrameworkCore;
- using Microsoft.EntityFrameworkCore.Infrastructure;
- using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
- using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
- #nullable disable
- namespace AvaloniaPractic.Migrations
- {
- [DbContext(typeof(AppDbContext))]
- partial class AppDbContextModelSnapshot : ModelSnapshot
- {
- protected override void BuildModel(ModelBuilder modelBuilder)
- {
- #pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "8.0.8")
- .HasAnnotation("Relational:MaxIdentifierLength", 63);
- NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
- modelBuilder.Entity("AvaloniaApplication2.Models.User", b =>
- {
- b.Property<int>("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("integer")
- .HasColumnName("id");
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
- b.Property<DateTime?>("Createdat")
- .ValueGeneratedOnAdd()
- .HasColumnType("timestamp without time zone")
- .HasColumnName("createdat")
- .HasDefaultValueSql("CURRENT_TIMESTAMP");
- b.Property<string>("Email")
- .IsRequired()
- .HasMaxLength(255)
- .HasColumnType("character varying(255)")
- .HasColumnName("email");
- b.Property<string>("Username")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("character varying(100)")
- .HasColumnName("username");
- b.HasKey("Id")
- .HasName("users_pkey");
- b.ToTable("users", (string)null);
- });
- modelBuilder.Entity("AvaloniaPractic.Models.Logined", b =>
- {
- b.Property<int>("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("integer");
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
- b.Property<string>("Login")
- .IsRequired()
- .HasColumnType("text");
- b.Property<string>("Password")
- .IsRequired()
- .HasColumnType("text");
- b.Property<int>("RoleId")
- .HasColumnType("integer");
- b.Property<int>("UserId")
- .HasColumnType("integer");
- b.HasKey("Id");
- b.HasIndex("RoleId");
- b.HasIndex("UserId");
- b.ToTable("Logins");
- });
- modelBuilder.Entity("AvaloniaPractic.Models.Role", 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("Roles");
- });
- modelBuilder.Entity("AvaloniaPractic.Models.Logined", b =>
- {
- b.HasOne("AvaloniaPractic.Models.Role", "Role")
- .WithMany("Logins")
- .HasForeignKey("RoleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- b.HasOne("AvaloniaApplication2.Models.User", "User")
- .WithMany("Logins")
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- b.Navigation("Role");
- b.Navigation("User");
- });
- modelBuilder.Entity("AvaloniaApplication2.Models.User", b =>
- {
- b.Navigation("Logins");
- });
- modelBuilder.Entity("AvaloniaPractic.Models.Role", b =>
- {
- b.Navigation("Logins");
- });
- #pragma warning restore 612, 618
- }
- }
- }
|