From 79f5eaf40b93d64be74d8b4f1ef80d19fadbfbe1 Mon Sep 17 00:00:00 2001 From: Paweł Bernaciak Date: Fri, 29 Dec 2023 09:41:56 +0100 Subject: Cywilizowany tailwind --- .../ApplicationDbContextModelSnapshot.cs | 70 ++++++++++++++++++++-- 1 file changed, 64 insertions(+), 6 deletions(-) (limited to 'CoreWiki/Migrations/ApplicationDbContextModelSnapshot.cs') diff --git a/CoreWiki/Migrations/ApplicationDbContextModelSnapshot.cs b/CoreWiki/Migrations/ApplicationDbContextModelSnapshot.cs index 4808c70..004bfe7 100644 --- a/CoreWiki/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/CoreWiki/Migrations/ApplicationDbContextModelSnapshot.cs @@ -19,8 +19,9 @@ namespace CoreWiki.Migrations modelBuilder.Entity("CoreWiki.Models.Article", b => { - b.Property("Slug") - .HasColumnType("TEXT"); + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); b.Property("Content") .IsRequired() @@ -30,24 +31,81 @@ namespace CoreWiki.Migrations .HasColumnType("TEXT") .HasColumnName("Published"); + b.Property("Slug") + .IsRequired() + .HasColumnType("TEXT"); + b.Property("Topic") .IsRequired() .HasMaxLength(100) .HasColumnType("TEXT"); - b.HasKey("Slug"); + b.Property("ViewCount") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); b.ToTable("Articles"); b.HasData( new { - Slug = "home-page", + Id = 1, Content = "Welcome to your new CoreWiki installation", - PublishedDateTime = new DateTime(2023, 12, 22, 13, 41, 24, 978, DateTimeKind.Utc).AddTicks(110), - Topic = "Home Page" + PublishedDateTime = new DateTime(2023, 12, 25, 20, 29, 5, 642, DateTimeKind.Utc).AddTicks(7240), + Slug = "home-page", + Topic = "Home Page", + ViewCount = 0 }); }); + + modelBuilder.Entity("CoreWiki.Models.Comment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ArticleId") + .HasColumnType("INTEGER"); + + b.Property("Content") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("DisplayName") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("EMail") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("SubmittedDateTime") + .HasColumnType("TEXT") + .HasColumnName("Submitted"); + + b.HasKey("Id"); + + b.HasIndex("ArticleId"); + + b.ToTable("Comment"); + }); + + modelBuilder.Entity("CoreWiki.Models.Comment", b => + { + b.HasOne("CoreWiki.Models.Article", "Article") + .WithMany("Comments") + .HasForeignKey("ArticleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Article"); + }); + + modelBuilder.Entity("CoreWiki.Models.Article", b => + { + b.Navigation("Comments"); + }); #pragma warning restore 612, 618 } } -- cgit v1.2.3