80 lines
2.5 KiB
C#
80 lines
2.5 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using HackerNet.Infrastructure.Repositories.EntityFramework;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace HackerNet.Infrastructure.Migrations
|
|
{
|
|
[DbContext(typeof(HackerContext))]
|
|
[Migration("20211215082223_CreateLinkAndComment")]
|
|
partial class CreateLinkAndComment
|
|
{
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
|
|
|
|
modelBuilder.Entity("HackerNet.Domain.Comment", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Content")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<Guid>("LinkId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("LinkId");
|
|
|
|
b.ToTable("Comments");
|
|
});
|
|
|
|
modelBuilder.Entity("HackerNet.Domain.Link", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Url")
|
|
.IsRequired()
|
|
.HasMaxLength(250)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Links");
|
|
});
|
|
|
|
modelBuilder.Entity("HackerNet.Domain.Comment", b =>
|
|
{
|
|
b.HasOne("HackerNet.Domain.Link", null)
|
|
.WithMany()
|
|
.HasForeignKey("LinkId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|