Updates base entities to contain a DeletedDate if the entity gets deleted

This commit is contained in:
Shannon
2017-04-28 11:15:19 +10:00
parent 5b0e824301
commit 3779b3c782
10 changed files with 26 additions and 1 deletions

View File

@@ -101,6 +101,9 @@ namespace Umbraco.Core.Models.EntityBase
set { SetPropertyValueAndDetectChanges(value, ref _updateDate, Ps.Value.UpdateDateSelector); }
}
[IgnoreDataMember]
public DateTime? DeletedDate { get; set; }
internal virtual void ResetIdentity()
{
_hasIdentity = false;

View File

@@ -3,7 +3,7 @@
/// <summary>
/// Marker interface for aggregate roots
/// </summary>
public interface IAggregateRoot : IEntity
public interface IAggregateRoot : IEntityDeleted
{
}

View File

@@ -3,6 +3,12 @@ using System.Runtime.Serialization;
namespace Umbraco.Core.Models.EntityBase
{
public interface IEntityDeleted : IEntity
{
[DataMember]
DateTime? DeletedDate { get; set; }
}
/// <summary>
/// Defines an Entity.
/// Entities should always have an Id, Created and Modified date