mirror of https://github.com/Squidex/squidex.git
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.
23 lines
908 B
23 lines
908 B
// ==========================================================================
|
|
// Squidex Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) Squidex UG (haftungsbeschraenkt)
|
|
// All rights reserved. Licensed under the MIT license.
|
|
// ==========================================================================
|
|
|
|
#pragma warning disable SA1313 // Parameter names should begin with lower-case letter
|
|
|
|
namespace Squidex.Infrastructure.Commands
|
|
{
|
|
public record CommandResult(DomainId Id, long NewVersion, long OldVersion, object Payload)
|
|
{
|
|
public bool IsCreated => OldVersion < 0;
|
|
|
|
public bool IsChanged => OldVersion != NewVersion;
|
|
|
|
public static CommandResult Empty(DomainId id, long newVersion, long oldVersion)
|
|
{
|
|
return new CommandResult(id, newVersion, oldVersion, None.Value);
|
|
}
|
|
}
|
|
}
|
|
|