Updated admin page to be more streamlined and added the beginning of the blogging features

This commit is contained in:
Vincent Allen
2025-10-21 13:32:39 -04:00
parent 0e24ce2073
commit b34449808f
224 changed files with 27064 additions and 396 deletions

View File

@@ -0,0 +1,39 @@
using NpgsqlTypes;
using System.ComponentModel.DataAnnotations;
namespace OpenArchival.DataAccess;
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>
public string Content { get; set; } = "";
public DateTime CreationTime { get; set; }
public DateTime ModifiedTime { get; set; }
public List<BlogPostTag> Tags { get; set; } = [];
public List<ArtifactGrouping> ArtifactGroupings { get; set; } = [];
public NpgsqlTsVector ContentSearchVector { get; set; } = default!;
public NpgsqlTsVector TitleSearchVector { get; set; } = default!;
public string TagsSearchString { get; set; } = "";
public NpgsqlTsVector TagsSearchVector { get; set; } = default!;
public string AllSearchString { get; set; } = "";
public NpgsqlTsVector AllSearchVector { get; set; } = default!;
}

View File

@@ -0,0 +1,24 @@
using System.ComponentModel.DataAnnotations;
namespace OpenArchival.DataAccess;
public class BlogPostTag
{
[Key]
public int Id { get; set; }
/// <summary>
/// The name of this tags
/// </summary>
public string Name { get; set; } = "";
/// <summary>
/// Blog posts assocaited with this tag
/// </summary>
public List<BlogPostTag> BlogPostTags { get; set; } = [];
public override string ToString()
{
return Name;
}
}