Fixed bug where deletes of artifact groupings would not cascade
This commit is contained in:
@@ -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!;
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
12
OpenArchival.DataAccess/Models/Blog/BlogViewCount.cs
Normal file
12
OpenArchival.DataAccess/Models/Blog/BlogViewCount.cs
Normal 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; }
|
||||
}
|
||||
Reference in New Issue
Block a user