using System; using System.Diagnostics; using zero.Core.Attributes; namespace zero.Core.Entities { [DebuggerDisplay("Id = {Id,nq}, Name = {Name}, Alias = {Alias}")] public abstract class DatabaseEntity : IDatabaseEntity { /// [GenerateId] public string Id { get; set; } /// [MapAppId] public string AppId { get; set; } /// public string Name { get; set; } /// public string Alias { get; set; } /// public uint Sort { get; set; } /// public bool IsActive { get; set; } /// public DateTimeOffset CreatedDate { get; set; } } public interface IDatabaseEntity { /// /// Id of the entity /// string Id { get; set; } /// /// Id of the associated application (auto-filled) /// string AppId { get; set; } /// /// Full name of the entity /// string Name { get; set; } /// /// Unique alias which can be used in the frontend and URLs /// As generating aliases from the name would not be unique we append an incremental number if the desired alias is not available anymore /// string Alias { get; set; } /// /// Sort order /// uint Sort { get; set; } /// /// Whether the entity is visible in the frontend /// bool IsActive { get; set; } /// /// Date of creation /// DateTimeOffset CreatedDate { get; set; } } }