Adds deletion to audits on Creator

This commit is contained in:
2025-04-15 02:56:24 -04:00
parent 14e601ef06
commit d3a4f66b0e
8 changed files with 920 additions and 10 deletions

View File

@@ -86,6 +86,17 @@ namespace Hutopy.Web.Features.Contents.Data.Migrations
b.Property<Guid>("CreatedBy")
.HasColumnType("uuid");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("timestamp with time zone");
b.Property<Guid?>("DeletedBy")
.HasColumnType("uuid");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("boolean")
.HasComputedColumnSql("\"DeletedAt\" IS NOT NULL", true);
b.Property<Guid>("SlugsId")
.HasColumnType("uuid");
@@ -145,9 +156,7 @@ namespace Hutopy.Web.Features.Contents.Data.Migrations
{
b.HasOne("Hutopy.Web.Features.Contents.Data.Creator", "Creator")
.WithMany()
.HasForeignKey("CreatedBy")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
.HasForeignKey("CreatedBy");
b.OwnsMany("Hutopy.Web.Features.Contents.Data.ContentReaction", "Reactions", b1 =>
{