init
This commit is contained in:
@@ -16,8 +16,15 @@ public class FilePathListing
|
||||
public BlogPost? ParentBlogPost { get; set; }
|
||||
|
||||
public int? ParentBlogPostId { get; set; }
|
||||
|
||||
public int? HomePageConfigurationId { get; set; }
|
||||
public HomePageConfiguration? HomePageConfiguration { get; set; }
|
||||
|
||||
public required string OriginalName { get; set; }
|
||||
|
||||
public required string Path { get; set; }
|
||||
|
||||
public string? SmallThumbnailPath { get; set; }
|
||||
|
||||
public string? LargeThumbnailPath { get; set; }
|
||||
}
|
||||
|
||||
17
OpenArchival.DataAccess/Models/HomePageConfiguration.cs
Normal file
17
OpenArchival.DataAccess/Models/HomePageConfiguration.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenArchival.DataAccess;
|
||||
|
||||
public class HomePageConfiguration
|
||||
{
|
||||
[DefaultValue(1)]
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
|
||||
public FilePathListing? HomePageBanner { get; set; }
|
||||
|
||||
public string? Content { get; set; }
|
||||
|
||||
public List<SearchPageSliderEntry>? SliderEntries { get; set; }
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenArchival.DataAccess;
|
||||
|
||||
@@ -19,8 +20,21 @@ public class SearchPageSliderEntry
|
||||
/// </summary>
|
||||
public List<ArtifactEntryTag> FilterTags { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Only set to true when the slider should show up on the home page, if it is false,
|
||||
/// it is assumed that this slider should only show up on the featured page
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
public bool IsHomePageSlider { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Linkage to the homepage configuration if this slider is part of it
|
||||
/// </summary>
|
||||
public HomePageConfiguration? HomePageConfiguration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The maximum number of artifact entries that should be pulled for this slider
|
||||
/// </summary>
|
||||
public int MaxCount { get; set; } = 10;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user