Fixed bug where deletes of artifact groupings would not cascade

This commit is contained in:
Vincent Allen
2025-11-12 19:10:35 -05:00
parent b34449808f
commit 9298829db6
325 changed files with 5233 additions and 20996 deletions

View File

@@ -7,12 +7,12 @@ public class BlogPost
{
[Key]
public int Id { get; set; }
/// <summary>
/// The title of the blog post
/// </summary>
public string Title { get; set; } = "";
/// <summary>
/// The HTML content of the post
/// </summary>
@@ -24,6 +24,10 @@ public class BlogPost
public List<BlogPostTag> Tags { get; set; } = [];
public BlogPostViewCount Views { get; set; } = default!;
public FilePathListing MainPhoto { get; set; } = default!;
public List<ArtifactGrouping> ArtifactGroupings { get; set; } = [];
public NpgsqlTsVector ContentSearchVector { get; set; } = default!;

View File

@@ -15,7 +15,7 @@ public class BlogPostTag
/// <summary>
/// Blog posts assocaited with this tag
/// </summary>
public List<BlogPostTag> BlogPostTags { get; set; } = [];
public List<BlogPost> BlogPosts { get; set; } = [];
public override string ToString()
{

View File

@@ -0,0 +1,12 @@
namespace OpenArchival.DataAccess;
public class BlogPostViewCount
{
public int Id { get; set; }
public required BlogPost Post { get; set; }
public int BlogPostId { get; set; }
public int Views { get; set; }
}