251 lines
7.9 KiB
C#
251 lines
7.9 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using DBConnection;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace DBConnection.Migrations
|
|
{
|
|
[DbContext(typeof(AppDbContext))]
|
|
[Migration("20220715030913_Initial")]
|
|
partial class Initial
|
|
{
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder.HasAnnotation("ProductVersion", "6.0.7");
|
|
|
|
modelBuilder.Entity("DBConnection.Models.Author", b =>
|
|
{
|
|
b.Property<string>("Url")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("DateCreated")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("DateModified")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Url");
|
|
|
|
b.ToTable("Authors");
|
|
});
|
|
|
|
modelBuilder.Entity("DBConnection.Models.Chapter", b =>
|
|
{
|
|
b.Property<string>("Url")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("ChapterNumber")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Content")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("DateCreated")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("DateModified")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("DatePosted")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("DateUpdated")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("NovelUrl")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("RawContent")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Url");
|
|
|
|
b.HasIndex("NovelUrl");
|
|
|
|
b.ToTable("Chapters");
|
|
});
|
|
|
|
modelBuilder.Entity("DBConnection.Models.Novel", b =>
|
|
{
|
|
b.Property<string>("Url")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("AuthorUrl")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("DateCreated")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("DateModified")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("DatePosted")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("LastUpdated")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Url");
|
|
|
|
b.HasIndex("AuthorUrl");
|
|
|
|
b.ToTable("Novels");
|
|
});
|
|
|
|
modelBuilder.Entity("DBConnection.Models.Tag", b =>
|
|
{
|
|
b.Property<string>("TagValue")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("DateCreated")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("DateModified")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("TagValue");
|
|
|
|
b.ToTable("Tags");
|
|
});
|
|
|
|
modelBuilder.Entity("DBConnection.Models.User", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("DateCreated")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("DateModified")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Email")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Users");
|
|
});
|
|
|
|
modelBuilder.Entity("DBConnection.Models.UserNovel", b =>
|
|
{
|
|
b.Property<string>("NovelUrl")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("UserId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("LastChapterRead")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("NovelUrl", "UserId");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("UserNovels");
|
|
});
|
|
|
|
modelBuilder.Entity("NovelTag", b =>
|
|
{
|
|
b.Property<string>("NovelsUrl")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("TagsTagValue")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("NovelsUrl", "TagsTagValue");
|
|
|
|
b.HasIndex("TagsTagValue");
|
|
|
|
b.ToTable("NovelTag");
|
|
});
|
|
|
|
modelBuilder.Entity("DBConnection.Models.Chapter", b =>
|
|
{
|
|
b.HasOne("DBConnection.Models.Novel", null)
|
|
.WithMany("Chapters")
|
|
.HasForeignKey("NovelUrl");
|
|
});
|
|
|
|
modelBuilder.Entity("DBConnection.Models.Novel", b =>
|
|
{
|
|
b.HasOne("DBConnection.Models.Author", "Author")
|
|
.WithMany("Novels")
|
|
.HasForeignKey("AuthorUrl");
|
|
|
|
b.Navigation("Author");
|
|
});
|
|
|
|
modelBuilder.Entity("DBConnection.Models.UserNovel", b =>
|
|
{
|
|
b.HasOne("DBConnection.Models.Novel", "Novel")
|
|
.WithMany()
|
|
.HasForeignKey("NovelUrl")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("DBConnection.Models.User", "User")
|
|
.WithMany("WatchedNovels")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Novel");
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("NovelTag", b =>
|
|
{
|
|
b.HasOne("DBConnection.Models.Novel", null)
|
|
.WithMany()
|
|
.HasForeignKey("NovelsUrl")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("DBConnection.Models.Tag", null)
|
|
.WithMany()
|
|
.HasForeignKey("TagsTagValue")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("DBConnection.Models.Author", b =>
|
|
{
|
|
b.Navigation("Novels");
|
|
});
|
|
|
|
modelBuilder.Entity("DBConnection.Models.Novel", b =>
|
|
{
|
|
b.Navigation("Chapters");
|
|
});
|
|
|
|
modelBuilder.Entity("DBConnection.Models.User", b =>
|
|
{
|
|
b.Navigation("WatchedNovels");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|