using System;
using System.Diagnostics;
using zero.Core.Attributes;
namespace zero.Core.Entities
{
[DebuggerDisplay("Id = {Id,nq}, Name = {Name}")]
public abstract class DatabaseEntity : IDatabaseEntity
{
///
[GenerateId]
public string Id { get; set; }
///
[MapAppId]
public string AppId { get; set; }
///
public string Name { 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; }
///
/// 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; }
}
}