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.
38 lines
1.1 KiB
38 lines
1.1 KiB
// ==========================================================================
|
|
// Squidex Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) Squidex UG (haftungsbeschraenkt)
|
|
// All rights reserved. Licensed under the MIT license.
|
|
// ==========================================================================
|
|
|
|
using Squidex.Domain.Apps.Core.Contents;
|
|
using Squidex.Infrastructure;
|
|
|
|
namespace Squidex.Domain.Apps.Entities.Contents.DomainObject
|
|
{
|
|
public sealed class ContentVersion
|
|
{
|
|
public Status Status { get; }
|
|
|
|
public ContentData Data { get; }
|
|
|
|
public ContentVersion(Status status, ContentData data)
|
|
{
|
|
Guard.NotNull(data, nameof(data));
|
|
|
|
Status = status;
|
|
|
|
Data = data;
|
|
}
|
|
|
|
public ContentVersion WithStatus(Status status)
|
|
{
|
|
return new ContentVersion(status, Data);
|
|
}
|
|
|
|
public ContentVersion WithData(ContentData data)
|
|
{
|
|
return new ContentVersion(Status, data);
|
|
}
|
|
}
|
|
}
|
|
|