86 lines
2.8 KiB
C#
86 lines
2.8 KiB
C#
// <auto-generated />
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
using USEntryCoach.Server.Data;
|
|
|
|
#nullable disable
|
|
|
|
namespace USEntryCoach.Server.Migrations
|
|
{
|
|
[DbContext(typeof(BloggingContext))]
|
|
partial class BloggingContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "9.0.5")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("USEntryCoach.Server.Data.Blog", b =>
|
|
{
|
|
b.Property<int>("BlogId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("BlogId"));
|
|
|
|
b.Property<string>("Url")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("BlogId");
|
|
|
|
b.ToTable("Blogs");
|
|
});
|
|
|
|
modelBuilder.Entity("USEntryCoach.Server.Data.Post", b =>
|
|
{
|
|
b.Property<int>("PostId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("PostId"));
|
|
|
|
b.Property<int>("BlogId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Content")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("PostId");
|
|
|
|
b.HasIndex("BlogId");
|
|
|
|
b.ToTable("Posts");
|
|
});
|
|
|
|
modelBuilder.Entity("USEntryCoach.Server.Data.Post", b =>
|
|
{
|
|
b.HasOne("USEntryCoach.Server.Data.Blog", "Blog")
|
|
.WithMany("Posts")
|
|
.HasForeignKey("BlogId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Blog");
|
|
});
|
|
|
|
modelBuilder.Entity("USEntryCoach.Server.Data.Blog", b =>
|
|
{
|
|
b.Navigation("Posts");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|