2020-10-12 13:14:23 +02:00
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using System;
|
2020-08-27 11:41:40 +02:00
|
|
|
using zero.Core.Attributes;
|
2020-08-17 11:20:47 +02:00
|
|
|
|
|
|
|
|
namespace zero.Core.Entities
|
2020-03-23 11:57:07 +01:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// A page can consist of unlimited properties and be rendered as you wish
|
|
|
|
|
/// The backoffice rendering is done by an IRenderer
|
|
|
|
|
/// </summary>
|
2020-05-25 11:27:23 +02:00
|
|
|
public class Page : ZeroEntity, IPage
|
2020-03-23 11:57:07 +01:00
|
|
|
{
|
2020-10-23 13:07:00 +02:00
|
|
|
/// <inheritdoc />
|
|
|
|
|
public string UrlAlias { get; set; }
|
|
|
|
|
|
2020-05-25 11:27:23 +02:00
|
|
|
/// <inheritdoc />
|
2020-10-12 13:14:23 +02:00
|
|
|
public string ParentId { get; set; }
|
2020-05-19 15:53:01 +02:00
|
|
|
|
2020-05-25 11:27:23 +02:00
|
|
|
/// <inheritdoc />
|
2020-05-19 15:53:01 +02:00
|
|
|
public string PageTypeAlias { get; set; }
|
|
|
|
|
|
2020-08-17 11:20:47 +02:00
|
|
|
/// <inheritdoc />
|
|
|
|
|
public DateTimeOffset? PublishDate { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
public DateTimeOffset? UnpublishDate { get; set; }
|
2020-03-23 11:57:07 +01:00
|
|
|
}
|
2020-05-25 11:27:23 +02:00
|
|
|
|
|
|
|
|
|
2020-08-27 11:41:40 +02:00
|
|
|
[Collection("Pages")]
|
2020-11-14 12:34:26 +01:00
|
|
|
public interface IPage : IZeroEntity, IZeroDbConventions
|
2020-05-25 11:27:23 +02:00
|
|
|
{
|
2020-10-23 13:07:00 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Use this field (when filled out) instead of the alias for URL generation
|
|
|
|
|
/// </summary>
|
|
|
|
|
string UrlAlias { get; set; }
|
|
|
|
|
|
2020-05-25 11:27:23 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Id of the parent page
|
|
|
|
|
/// </summary>
|
2020-10-12 13:14:23 +02:00
|
|
|
string ParentId { get; set; }
|
2020-05-25 11:27:23 +02:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Alias of the used page type
|
|
|
|
|
/// </summary>
|
|
|
|
|
string PageTypeAlias { get; set; }
|
2020-08-14 14:42:31 +02:00
|
|
|
|
2020-08-17 11:20:47 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Date when the page is published
|
|
|
|
|
/// </summary>
|
|
|
|
|
DateTimeOffset? PublishDate { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Date when the page is unpublished
|
|
|
|
|
/// </summary>
|
|
|
|
|
DateTimeOffset? UnpublishDate { get; set; }
|
2020-05-25 11:27:23 +02:00
|
|
|
}
|
2020-05-12 13:42:01 +02:00
|
|
|
}
|