mirror of https://github.com/Squidex/squidex.git
2 changed files with 70 additions and 0 deletions
@ -0,0 +1,46 @@ |
|||
// ==========================================================================
|
|||
// Squidex Headless CMS
|
|||
// ==========================================================================
|
|||
// Copyright (c) Squidex UG (haftungsbeschränkt)
|
|||
// All rights reserved. Licensed under the MIT license.
|
|||
// ==========================================================================
|
|||
|
|||
using Squidex.Infrastructure; |
|||
using System; |
|||
|
|||
namespace Squidex.Domain.Apps.Core.Contents |
|||
{ |
|||
public struct Status2 : IEquatable<Status2> |
|||
{ |
|||
public static readonly Status2 Published = new Status2("Published"); |
|||
|
|||
public string Name { get; } |
|||
|
|||
public Status2(string name) |
|||
{ |
|||
Guard.NotNullOrEmpty(name, nameof(name)); |
|||
|
|||
Name = name; |
|||
} |
|||
|
|||
public override bool Equals(object obj) |
|||
{ |
|||
return base.Equals(obj); |
|||
} |
|||
|
|||
public bool Equals(Status2 other) |
|||
{ |
|||
throw new NotImplementedException(); |
|||
} |
|||
|
|||
public override int GetHashCode() |
|||
{ |
|||
return base.GetHashCode(); |
|||
} |
|||
|
|||
public override string ToString() |
|||
{ |
|||
return Name; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,24 @@ |
|||
// ==========================================================================
|
|||
// Squidex Headless CMS
|
|||
// ==========================================================================
|
|||
// Copyright (c) Squidex UG (haftungsbeschraenkt)
|
|||
// All rights reserved. Licensed under the MIT license.
|
|||
// ==========================================================================
|
|||
|
|||
using System.Threading.Tasks; |
|||
using Squidex.Domain.Apps.Core.Contents; |
|||
using Squidex.Domain.Apps.Entities.Schemas; |
|||
|
|||
namespace Squidex.Domain.Apps.Entities.Contents |
|||
{ |
|||
public interface IContentWorkflow |
|||
{ |
|||
Task<Status2> GetInitialStatusAsync(ISchemaEntity schema); |
|||
|
|||
Task<bool> IsValidNextStatus(IContentEntity content, Status2 next); |
|||
|
|||
Task<Status2[]> GetNextsAsync(IContentEntity content); |
|||
|
|||
Task<Status2[]> GetAllAsync(ISchemaEntity schema); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue