using Newtonsoft.Json;
using System.Diagnostics;
namespace zero.Models;
[DebuggerDisplay("Id = {Id,nq}, Name = {Name}, Alias = {Alias}")]
public class ZeroEntity : ZeroIdEntity, ISupportsDbConventions, ISupportsRouting, ISupportsFlavors, ISupportsSorting
{
///
/// Full name of the entity
///
public string Name { get; set; }
///
/// Alias (non-unique) which can be used in the frontend and URLs
///
public string Alias { get; set; }
///
/// A key which can be used to query this entity in code
///
public string Key { get; set; }
///
/// Sort order
///
public uint Sort { get; set; }
///
/// Whether the entity is visible in the frontend
///
public bool IsActive { get; set; }
///
/// Unique hash for this entity (primarily used for routing)
///
public string Hash { get; set; }
///
/// Backoffice user who last modified this content
///
public string LastModifiedById { get; set; }
///
/// Date of last modification
///
public DateTimeOffset LastModifiedDate { get; set; }
///
/// Backoffice user who created this content
///
public string CreatedById { get; set; }
///
/// Date of creation
///
public DateTimeOffset CreatedDate { get; set; }
///
/// Configuration of the base entity (which this one inherits from)
///
public BlueprintConfiguration Blueprint { get; set; }
///
/// Language of the entity
///
public string LanguageId { get; set; }
///
/// Alias of the used flavor (uses default if empty)
///
public string Flavor { get; set; }
///
/// Additional properties for this entity
///
public Dictionary Properties { get; set; } = new();
///
/// [Warning] This field is always empty when bound to the database.
/// It is only filled in the app-code for routing.
///
[JsonIgnore]
public string Url { get; set; }
}