This commit is contained in:
Дмитрий Шиманский
2023-12-23 23:18:52 +03:00
parent 8df7e26494
commit 153979cbbd
10 changed files with 295 additions and 83 deletions

View File

@@ -22,26 +22,6 @@ namespace yaflay.ru.Migrations
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("yaflay.ru.Models.Tables.Author", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<decimal>("discordId")
.HasColumnType("numeric(20,0)");
b.Property<string>("discordNickName")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Author");
});
modelBuilder.Entity("yaflay.ru.Models.Tables.Blogs", b =>
{
b.Property<int>("Id")
@@ -65,16 +45,19 @@ namespace yaflay.ru.Migrations
.IsRequired()
.HasColumnType("text");
b.Property<int>("authorId")
.HasColumnType("integer");
b.Property<string>("authorId")
.IsRequired()
.HasColumnType("text");
b.Property<string>("authorNickname")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime>("dateTime")
.HasColumnType("timestamp with time zone");
.HasColumnType("timestamp without time zone");
b.HasKey("Id");
b.HasIndex("authorId");
b.ToTable("Blogs", "public");
});
@@ -123,17 +106,6 @@ namespace yaflay.ru.Migrations
b.ToTable("Redirects");
});
modelBuilder.Entity("yaflay.ru.Models.Tables.Blogs", b =>
{
b.HasOne("yaflay.ru.Models.Tables.Author", "author")
.WithMany()
.HasForeignKey("authorId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("author");
});
#pragma warning restore 612, 618
}
}