274 lines
9.1 KiB
C#
274 lines
9.1 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using DBConnection.Contexts;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace DBConnection.Migrations.PostgresSql
|
|
{
|
|
[DbContext(typeof(PostgresSqlAppDbContext))]
|
|
partial class PostgresSqlAppDbContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "6.0.7")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
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("Common.Models.DBDomain.Author", b =>
|
|
{
|
|
b.Property<string>("Url")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("DateCreated")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<DateTime>("DateModified")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Url");
|
|
|
|
b.ToTable("Authors");
|
|
});
|
|
|
|
modelBuilder.Entity("Common.Models.DBDomain.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("timestamp with time zone");
|
|
|
|
b.Property<DateTime>("DateModified")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<DateTime?>("DatePosted")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<DateTime?>("DateUpdated")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<DateTime?>("LastContentFetch")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("NovelUrl")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("RawContent")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Url");
|
|
|
|
b.HasIndex("NovelUrl");
|
|
|
|
b.ToTable("Chapters");
|
|
});
|
|
|
|
modelBuilder.Entity("Common.Models.DBDomain.Novel", b =>
|
|
{
|
|
b.Property<string>("Url")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("AuthorUrl")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("DateCreated")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<DateTime>("DateModified")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<DateTime>("DatePosted")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("Guid")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("LastUpdated")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Url");
|
|
|
|
b.HasIndex("AuthorUrl");
|
|
|
|
b.HasIndex("Guid");
|
|
|
|
b.ToTable("Novels");
|
|
});
|
|
|
|
modelBuilder.Entity("Common.Models.DBDomain.Tag", b =>
|
|
{
|
|
b.Property<string>("TagValue")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("DateCreated")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<DateTime>("DateModified")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.HasKey("TagValue");
|
|
|
|
b.ToTable("Tags");
|
|
});
|
|
|
|
modelBuilder.Entity("Common.Models.DBDomain.User", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime>("DateCreated")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<DateTime>("DateModified")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Email")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Email");
|
|
|
|
b.ToTable("Users");
|
|
});
|
|
|
|
modelBuilder.Entity("Common.Models.DBDomain.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.HasOne("Common.Models.DBDomain.Novel", null)
|
|
.WithMany()
|
|
.HasForeignKey("NovelsUrl")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Common.Models.DBDomain.Tag", null)
|
|
.WithMany()
|
|
.HasForeignKey("TagsTagValue")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Common.Models.DBDomain.Chapter", b =>
|
|
{
|
|
b.HasOne("Common.Models.DBDomain.Novel", "Novel")
|
|
.WithMany("Chapters")
|
|
.HasForeignKey("NovelUrl")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Novel");
|
|
});
|
|
|
|
modelBuilder.Entity("Common.Models.DBDomain.Novel", b =>
|
|
{
|
|
b.HasOne("Common.Models.DBDomain.Author", "Author")
|
|
.WithMany("Novels")
|
|
.HasForeignKey("AuthorUrl");
|
|
|
|
b.Navigation("Author");
|
|
});
|
|
|
|
modelBuilder.Entity("Common.Models.DBDomain.UserNovel", b =>
|
|
{
|
|
b.HasOne("Common.Models.DBDomain.Novel", "Novel")
|
|
.WithMany()
|
|
.HasForeignKey("NovelUrl")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Common.Models.DBDomain.User", "User")
|
|
.WithMany("WatchedNovels")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Novel");
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("Common.Models.DBDomain.Author", b =>
|
|
{
|
|
b.Navigation("Novels");
|
|
});
|
|
|
|
modelBuilder.Entity("Common.Models.DBDomain.Novel", b =>
|
|
{
|
|
b.Navigation("Chapters");
|
|
});
|
|
|
|
modelBuilder.Entity("Common.Models.DBDomain.User", b =>
|
|
{
|
|
b.Navigation("WatchedNovels");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|