|
@@ -82,16 +82,16 @@ public partial class ChernoshchekovaContext : DbContext
|
|
|
|
|
|
entity.ToTable("users");
|
|
|
|
|
|
- entity.Property(e => e.IdUser).HasColumnName("id_user");
|
|
|
+ entity.Property(e => e.IdUser)
|
|
|
+ .ValueGeneratedOnAdd()
|
|
|
+ .HasColumnName("id_user");
|
|
|
entity.Property(e => e.BirthDate)
|
|
|
.HasColumnType("timestamp without time zone")
|
|
|
.HasColumnName("birth_date");
|
|
|
entity.Property(e => e.Gender)
|
|
|
.ValueGeneratedOnAdd()
|
|
|
.HasColumnName("gender");
|
|
|
- entity.Property(e => e.LoginedId)
|
|
|
- .ValueGeneratedOnAdd()
|
|
|
- .HasColumnName("logined_id");
|
|
|
+ entity.Property(e => e.Image).HasColumnName("image");
|
|
|
entity.Property(e => e.UserName)
|
|
|
.HasColumnType("character varying")
|
|
|
.HasColumnName("user_name");
|
|
@@ -100,6 +100,11 @@ public partial class ChernoshchekovaContext : DbContext
|
|
|
.HasForeignKey(d => d.Gender)
|
|
|
.OnDelete(DeleteBehavior.ClientSetNull)
|
|
|
.HasConstraintName("users_gender_fk");
|
|
|
+
|
|
|
+ entity.HasOne(d => d.IdUserNavigation).WithOne(p => p.User)
|
|
|
+ .HasForeignKey<User>(d => d.IdUser)
|
|
|
+ .OnDelete(DeleteBehavior.ClientSetNull)
|
|
|
+ .HasConstraintName("users_logined_fk");
|
|
|
});
|
|
|
|
|
|
OnModelCreatingPartial(modelBuilder);
|