123 lines
3.8 KiB
C#
123 lines
3.8 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using SimpleWiki.Data;
|
|
|
|
#nullable disable
|
|
|
|
namespace SimpleWiki.Migrations
|
|
{
|
|
[DbContext(typeof(AppDbContext))]
|
|
partial class AppDbContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder.HasAnnotation("ProductVersion", "8.0.26");
|
|
|
|
modelBuilder.Entity("SimpleWiki.Models.Article", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("AuthorId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("MarkdownContent")
|
|
.IsRequired()
|
|
.HasMaxLength(20000)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Slug")
|
|
.IsRequired()
|
|
.HasMaxLength(180)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Summary")
|
|
.IsRequired()
|
|
.HasMaxLength(400)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasMaxLength(150)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime?>("UpdatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AuthorId");
|
|
|
|
b.HasIndex("Slug")
|
|
.IsUnique();
|
|
|
|
b.HasIndex("Title");
|
|
|
|
b.ToTable("articles", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("SimpleWiki.Models.User", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Email")
|
|
.IsRequired()
|
|
.HasMaxLength(256)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("FullName")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("PasswordHash")
|
|
.IsRequired()
|
|
.HasMaxLength(512)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Role")
|
|
.IsRequired()
|
|
.HasMaxLength(16)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Email")
|
|
.IsUnique();
|
|
|
|
b.ToTable("users", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("SimpleWiki.Models.Article", b =>
|
|
{
|
|
b.HasOne("SimpleWiki.Models.User", "Author")
|
|
.WithMany("Articles")
|
|
.HasForeignKey("AuthorId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Author");
|
|
});
|
|
|
|
modelBuilder.Entity("SimpleWiki.Models.User", b =>
|
|
{
|
|
b.Navigation("Articles");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|