102 lines
3.6 KiB
C#
102 lines
3.6 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using iPackage.Core.Web.Models.Entity;
|
|
|
|
namespace NugetTest.AspCore.Migrations
|
|
{
|
|
[DbContext(typeof(ApplicationContext))]
|
|
partial class ApplicationContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "5.0.0-preview.5.20278.2")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128)
|
|
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
|
|
|
modelBuilder.Entity("NugetTest.AspCore.Models.Article", b =>
|
|
{
|
|
b.Property<int>("ArticleId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int")
|
|
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
|
|
|
b.Property<string>("Content")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime>("CreationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<int>("PersonId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime>("RemoveTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.HasKey("ArticleId");
|
|
|
|
b.HasIndex("PersonId");
|
|
|
|
b.ToTable("Articles");
|
|
});
|
|
|
|
modelBuilder.Entity("NugetTest.AspCore.Models.Person", b =>
|
|
{
|
|
b.Property<int>("PersonId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int")
|
|
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
|
|
|
b.Property<DateTime>("CreationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("FamilyName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("FirstName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool>("IsRemoved")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<int?>("PersonId1")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime>("RemoveTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.HasKey("PersonId");
|
|
|
|
b.HasIndex("PersonId1");
|
|
|
|
b.ToTable("People");
|
|
});
|
|
|
|
modelBuilder.Entity("NugetTest.AspCore.Models.Article", b =>
|
|
{
|
|
b.HasOne("NugetTest.AspCore.Models.Person", "Person")
|
|
.WithMany()
|
|
.HasForeignKey("PersonId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("NugetTest.AspCore.Models.Person", b =>
|
|
{
|
|
b.HasOne("NugetTest.AspCore.Models.Person", null)
|
|
.WithMany("Persons")
|
|
.HasForeignKey("PersonId1");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|