97 lines
3.4 KiB
C#
97 lines
3.4 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using FictionArchive.Service.UserNovelDataService.Services;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using NodaTime;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace FictionArchive.Service.UserNovelDataService.Migrations
|
|
{
|
|
[DbContext(typeof(UserNovelDataServiceDbContext))]
|
|
partial class UserNovelDataServiceDbContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "9.0.11")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("FictionArchive.Service.UserNovelDataService.Models.Database.Bookmark", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<long>("ChapterId")
|
|
.HasColumnType("bigint");
|
|
|
|
b.Property<Instant>("CreatedTime")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Description")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Instant>("LastUpdatedTime")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<long>("NovelId")
|
|
.HasColumnType("bigint");
|
|
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId", "ChapterId")
|
|
.IsUnique();
|
|
|
|
b.HasIndex("UserId", "NovelId");
|
|
|
|
b.ToTable("Bookmarks");
|
|
});
|
|
|
|
modelBuilder.Entity("FictionArchive.Service.UserNovelDataService.Models.Database.User", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Instant>("CreatedTime")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Instant>("LastUpdatedTime")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("OAuthProviderId")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Users");
|
|
});
|
|
|
|
modelBuilder.Entity("FictionArchive.Service.UserNovelDataService.Models.Database.Bookmark", b =>
|
|
{
|
|
b.HasOne("FictionArchive.Service.UserNovelDataService.Models.Database.User", "User")
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("User");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|