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.
 
 
 
 
 

50 lines
1.4 KiB

// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschränkt)
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
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; } = EtagVersion.Empty;
public T Clone()
{
return Clone(x => { });
}
}
}