feat(domain): add workflow API core models and meta codes
This commit is contained in:
18
src/core/DigitalData.TaskFlow.Domain/Common/ApiEnvelope.cs
Normal file
18
src/core/DigitalData.TaskFlow.Domain/Common/ApiEnvelope.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace DigitalData.TaskFlow.Domain.Common;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the standard API envelope that contains meta information and payload data.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Type of the payload in the response.</typeparam>
|
||||
public sealed record ApiEnvelope<T>
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the list of metadata entries describing the business result.
|
||||
/// </summary>
|
||||
public required IReadOnlyList<MetaEntry> Meta { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the payload data returned by the endpoint.
|
||||
/// </summary>
|
||||
public T? Data { get; init; }
|
||||
}
|
||||
Reference in New Issue
Block a user