breaking search modifications into smaller PRs
This commit is contained in:
@ -4,18 +4,15 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json;
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
public class SearchContent : ModelBase
|
||||
public class SearchContent
|
||||
{
|
||||
public int SearchContentId { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string UniqueKey => $"{EntityName}:{EntityId}";
|
||||
public int SiteId { get; set; }
|
||||
|
||||
public string EntityName { get; set; }
|
||||
|
||||
public int EntityId { get; set; }
|
||||
|
||||
public int SiteId { get; set; }
|
||||
public string EntityId { get; set; }
|
||||
|
||||
public string Title { get; set; }
|
||||
|
||||
@ -25,16 +22,45 @@ namespace Oqtane.Models
|
||||
|
||||
public string Url { get; set; }
|
||||
|
||||
public DateTime ModifiedTime { get; set; }
|
||||
public string Permissions { get; set; }
|
||||
|
||||
public bool IsActive { get; set; } = true;
|
||||
public string ContentModifiedBy { get; set; }
|
||||
|
||||
public DateTime ContentModifiedOn { get; set; }
|
||||
|
||||
public string AdditionalContent { get; set; }
|
||||
|
||||
public DateTime CreatedOn { get; set; }
|
||||
|
||||
public List<SearchContentProperty> SearchContentProperties { get; set; }
|
||||
|
||||
public List<SearchContentWord> SearchContentWords { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string UniqueKey => $"{EntityName}:{EntityId}";
|
||||
|
||||
[NotMapped]
|
||||
public int TenantId { get; set; }
|
||||
|
||||
// constructors
|
||||
public SearchContent() { }
|
||||
|
||||
public SearchContent(int siteId, string entityName, string entityId, string title, string description, string body, string url, string permissions, string contentModifiedBy, DateTime contentModifiedOn)
|
||||
{
|
||||
SiteId = siteId;
|
||||
EntityName = entityName;
|
||||
EntityId = entityId;
|
||||
Title = title;
|
||||
Description = description;
|
||||
Body = body;
|
||||
Url = url;
|
||||
Permissions = permissions;
|
||||
ContentModifiedBy = contentModifiedBy;
|
||||
ContentModifiedOn = contentModifiedOn;
|
||||
AdditionalContent = "";
|
||||
CreatedOn = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonSerializer.Serialize(this);
|
||||
|
Reference in New Issue
Block a user