Adding inventory microservice
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
namespace InventoryApi.Models;
|
||||
|
||||
public enum InventoryMutationStatus
|
||||
{
|
||||
Ok,
|
||||
ItemNotFound,
|
||||
Invalid,
|
||||
Conflict
|
||||
}
|
||||
|
||||
public class InventoryMutationResult
|
||||
{
|
||||
public InventoryMutationStatus Status { get; init; } = InventoryMutationStatus.Ok;
|
||||
|
||||
public string OwnerType { get; init; } = string.Empty;
|
||||
|
||||
public string OwnerId { get; init; } = string.Empty;
|
||||
|
||||
public List<InventoryItem> Items { get; init; } = [];
|
||||
|
||||
public static implicit operator InventoryMutationStatus(InventoryMutationResult result) => result.Status;
|
||||
}
|
||||
Reference in New Issue
Block a user