|
@ -11,6 +11,7 @@ public class OrderStatus |
|
|
public static OrderStatus Paid = new OrderStatus(4, nameof(Paid).ToLowerInvariant()); |
|
|
public static OrderStatus Paid = new OrderStatus(4, nameof(Paid).ToLowerInvariant()); |
|
|
public static OrderStatus Shipped = new OrderStatus(5, nameof(Shipped).ToLowerInvariant()); |
|
|
public static OrderStatus Shipped = new OrderStatus(5, nameof(Shipped).ToLowerInvariant()); |
|
|
public static OrderStatus Cancelled = new OrderStatus(6, nameof(Cancelled).ToLowerInvariant()); |
|
|
public static OrderStatus Cancelled = new OrderStatus(6, nameof(Cancelled).ToLowerInvariant()); |
|
|
|
|
|
public static OrderStatus Completed = new OrderStatus(7, nameof(Completed).ToLowerInvariant()); |
|
|
|
|
|
|
|
|
public OrderStatus(int id, string name) |
|
|
public OrderStatus(int id, string name) |
|
|
: base(id, name) |
|
|
: base(id, name) |
|
@ -18,7 +19,7 @@ public class OrderStatus |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public static IEnumerable<OrderStatus> List() => |
|
|
public static IEnumerable<OrderStatus> List() => |
|
|
new[] { Submitted, AwaitingValidation, StockConfirmed, Paid, Shipped, Cancelled }; |
|
|
|
|
|
|
|
|
new[] { Submitted, AwaitingValidation, StockConfirmed, Paid, Shipped, Cancelled, Completed }; |
|
|
|
|
|
|
|
|
public static OrderStatus FromName(string name) |
|
|
public static OrderStatus FromName(string name) |
|
|
{ |
|
|
{ |
|
|