myWebLog/src/MyWebLog.DataCS/Migrations/WebLogDbContextModelSnapshot.cs

520 lines
16 KiB
C#

// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using MyWebLog.Data;
#nullable disable
namespace MyWebLog.Data.Migrations
{
[DbContext(typeof(WebLogDbContext))]
partial class WebLogDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "6.0.2");
modelBuilder.Entity("CategoryPost", b =>
{
b.Property<string>("CategoriesId")
.HasColumnType("TEXT");
b.Property<string>("PostsId")
.HasColumnType("TEXT");
b.HasKey("CategoriesId", "PostsId");
b.HasIndex("PostsId");
b.ToTable("CategoryPost");
});
modelBuilder.Entity("MyWebLog.Data.Category", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<string>("Description")
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("ParentId")
.HasColumnType("TEXT");
b.Property<string>("Slug")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("ParentId");
b.HasIndex("Slug");
b.ToTable("Category");
});
modelBuilder.Entity("MyWebLog.Data.Comment", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<string>("Email")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("InReplyToId")
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("PostId")
.IsRequired()
.HasColumnType("TEXT");
b.Property<DateTime>("PostedOn")
.HasColumnType("TEXT");
b.Property<int>("Status")
.HasColumnType("INTEGER");
b.Property<string>("Text")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Url")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("InReplyToId");
b.HasIndex("PostId");
b.ToTable("Comment");
});
modelBuilder.Entity("MyWebLog.Data.Page", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<string>("AuthorId")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Permalink")
.IsRequired()
.HasColumnType("TEXT");
b.Property<DateTime>("PublishedOn")
.HasColumnType("TEXT");
b.Property<bool>("ShowInPageList")
.HasColumnType("INTEGER");
b.Property<string>("Template")
.HasColumnType("TEXT");
b.Property<string>("Text")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Title")
.IsRequired()
.HasColumnType("TEXT");
b.Property<DateTime>("UpdatedOn")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("AuthorId");
b.HasIndex("Permalink");
b.ToTable("Page");
});
modelBuilder.Entity("MyWebLog.Data.PagePermalink", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<string>("PageId")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Url")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("PageId");
b.ToTable("PagePermalink");
});
modelBuilder.Entity("MyWebLog.Data.PageRevision", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<DateTime>("AsOf")
.HasColumnType("TEXT");
b.Property<string>("PageId")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("SourceType")
.HasColumnType("INTEGER");
b.Property<string>("Text")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("PageId");
b.ToTable("PageRevision");
});
modelBuilder.Entity("MyWebLog.Data.Post", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<string>("AuthorId")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Permalink")
.IsRequired()
.HasColumnType("TEXT");
b.Property<DateTime?>("PublishedOn")
.HasColumnType("TEXT");
b.Property<int>("Status")
.HasColumnType("INTEGER");
b.Property<string>("Text")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Title")
.IsRequired()
.HasColumnType("TEXT");
b.Property<DateTime>("UpdatedOn")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("AuthorId");
b.HasIndex("Permalink");
b.ToTable("Post");
});
modelBuilder.Entity("MyWebLog.Data.PostPermalink", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<string>("PostId")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Url")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("PostId");
b.ToTable("PostPermalink");
});
modelBuilder.Entity("MyWebLog.Data.PostRevision", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<DateTime>("AsOf")
.HasColumnType("TEXT");
b.Property<string>("PostId")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("SourceType")
.HasColumnType("INTEGER");
b.Property<string>("Text")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("PostId");
b.ToTable("PostRevision");
});
modelBuilder.Entity("MyWebLog.Data.Tag", b =>
{
b.Property<string>("Name")
.HasColumnType("TEXT");
b.HasKey("Name");
b.ToTable("Tag");
});
modelBuilder.Entity("MyWebLog.Data.WebLogDetails", b =>
{
b.Property<string>("Name")
.HasColumnType("TEXT");
b.Property<string>("DefaultPage")
.IsRequired()
.HasColumnType("TEXT");
b.Property<byte>("PostsPerPage")
.HasColumnType("INTEGER");
b.Property<string>("Subtitle")
.HasColumnType("TEXT");
b.Property<string>("ThemePath")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("TimeZone")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("UrlBase")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Name");
b.ToTable("WebLogDetails");
});
modelBuilder.Entity("MyWebLog.Data.WebLogUser", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<int>("AuthorizationLevel")
.HasColumnType("INTEGER");
b.Property<string>("FirstName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("LastName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("PasswordHash")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("PreferredName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<Guid>("Salt")
.HasColumnType("TEXT");
b.Property<string>("Url")
.HasColumnType("TEXT");
b.Property<string>("UserName")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("WebLogUser");
});
modelBuilder.Entity("PostTag", b =>
{
b.Property<string>("PostsId")
.HasColumnType("TEXT");
b.Property<string>("TagsName")
.HasColumnType("TEXT");
b.HasKey("PostsId", "TagsName");
b.HasIndex("TagsName");
b.ToTable("PostTag");
});
modelBuilder.Entity("CategoryPost", b =>
{
b.HasOne("MyWebLog.Data.Category", null)
.WithMany()
.HasForeignKey("CategoriesId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("MyWebLog.Data.Post", null)
.WithMany()
.HasForeignKey("PostsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("MyWebLog.Data.Category", b =>
{
b.HasOne("MyWebLog.Data.Category", "Parent")
.WithMany()
.HasForeignKey("ParentId");
b.Navigation("Parent");
});
modelBuilder.Entity("MyWebLog.Data.Comment", b =>
{
b.HasOne("MyWebLog.Data.Comment", "InReplyTo")
.WithMany()
.HasForeignKey("InReplyToId");
b.HasOne("MyWebLog.Data.Post", "Post")
.WithMany()
.HasForeignKey("PostId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("InReplyTo");
b.Navigation("Post");
});
modelBuilder.Entity("MyWebLog.Data.Page", b =>
{
b.HasOne("MyWebLog.Data.WebLogUser", "Author")
.WithMany("Pages")
.HasForeignKey("AuthorId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Author");
});
modelBuilder.Entity("MyWebLog.Data.PagePermalink", b =>
{
b.HasOne("MyWebLog.Data.Page", "Page")
.WithMany("PriorPermalinks")
.HasForeignKey("PageId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Page");
});
modelBuilder.Entity("MyWebLog.Data.PageRevision", b =>
{
b.HasOne("MyWebLog.Data.Page", "Page")
.WithMany("Revisions")
.HasForeignKey("PageId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Page");
});
modelBuilder.Entity("MyWebLog.Data.Post", b =>
{
b.HasOne("MyWebLog.Data.WebLogUser", "Author")
.WithMany("Posts")
.HasForeignKey("AuthorId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Author");
});
modelBuilder.Entity("MyWebLog.Data.PostPermalink", b =>
{
b.HasOne("MyWebLog.Data.Post", "Post")
.WithMany("PriorPermalinks")
.HasForeignKey("PostId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Post");
});
modelBuilder.Entity("MyWebLog.Data.PostRevision", b =>
{
b.HasOne("MyWebLog.Data.Post", "Post")
.WithMany("Revisions")
.HasForeignKey("PostId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Post");
});
modelBuilder.Entity("PostTag", b =>
{
b.HasOne("MyWebLog.Data.Post", null)
.WithMany()
.HasForeignKey("PostsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("MyWebLog.Data.Tag", null)
.WithMany()
.HasForeignKey("TagsName")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("MyWebLog.Data.Page", b =>
{
b.Navigation("PriorPermalinks");
b.Navigation("Revisions");
});
modelBuilder.Entity("MyWebLog.Data.Post", b =>
{
b.Navigation("PriorPermalinks");
b.Navigation("Revisions");
});
modelBuilder.Entity("MyWebLog.Data.WebLogUser", b =>
{
b.Navigation("Pages");
b.Navigation("Posts");
});
#pragma warning restore 612, 618
}
}
}