Files
Umbraco-CMS/src/Umbraco.Core/Models/EntityBase/IEntity.cs
Morten@Thinkpad-X220 dc1689bdf2 Removing PropertyValues-method from Content and Media and making it an extension method instead.
Adding the PropertyEditor model as internal to slowly adopt it using a slightly different model approach then in v5.
Minor refactoring of IEntity/Entity.
2012-10-05 11:03:08 -02:00

46 lines
1.3 KiB
C#

using System;
using System.Runtime.Serialization;
namespace Umbraco.Core.Models.EntityBase
{
/// <summary>
/// Defines an Entity.
/// Entities should always have an Id, Created and Modified date
/// </summary>
/// <remarks>The current database schema doesn't provide a modified date
/// for all entities, so this will have to be changed at a later stage.</remarks>
public interface IEntity
{
/// <summary>
/// The Id of the entity
/// </summary>
[DataMember]
int Id { get; set; }
/// <summary>
/// Guid based Id
/// </summary>
/// <remarks>The key is currectly used to store the Unique Id from the
/// umbracoNode table, which many of the entities are based on.</remarks>
[DataMember]
Guid Key { get; set; }
/// <summary>
/// Gets or sets the Created Date
/// </summary>
[DataMember]
DateTime CreateDate { get; set; }
/// <summary>
/// Gets or sets the Modified Date
/// </summary>
[DataMember]
DateTime UpdateDate { get; set; }
/// <summary>
/// Indicates whether the current entity has an identity, eg. Id.
/// </summary>
[IgnoreDataMember]
bool HasIdentity { get; }
}
}