Headless CMS and Content Managment Hub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

51 lines
1.3 KiB

// ==========================================================================
// DomainObjectState.cs
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex Group
// All rights reserved.
// ==========================================================================
using System;
using Newtonsoft.Json;
using NodaTime;
using Squidex.Infrastructure;
using Squidex.Infrastructure.Commands;
namespace Squidex.Domain.Apps.Entities
{
public abstract class DomainObjectState<T> : Cloneable<T>,
IDomainState,
IEntity,
IEntityWithCreatedBy,
IEntityWithLastModifiedBy,
IEntityWithVersion,
IUpdateableEntity,
IUpdateableEntityWithCreatedBy,
IUpdateableEntityWithLastModifiedBy
where T : Cloneable
{
[JsonProperty]
public Guid Id { get; set; }
[JsonProperty]
public RefToken CreatedBy { get; set; }
[JsonProperty]
public RefToken LastModifiedBy { get; set; }
[JsonProperty]
public Instant Created { get; set; }
[JsonProperty]
public Instant LastModified { get; set; }
[JsonProperty]
public long Version { get; set; }
public T Clone()
{
return Clone(x => { });
}
}
}