Enhance documentation with new features: added dark/light/system theme support, instructions page, and application catalog. Updated API and domain model for app management and automatic migrations on startup. Improved frontend structure with new routes and features for user instructions and app management.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
namespace PnvPanel.Application.Common.Models;
|
||||
|
||||
public enum ErrorType
|
||||
{
|
||||
Failure,
|
||||
Validation,
|
||||
NotFound,
|
||||
Conflict,
|
||||
Unauthorized,
|
||||
Forbidden,
|
||||
}
|
||||
|
||||
public sealed record Error(string Code, string Message, ErrorType Type = ErrorType.Failure)
|
||||
{
|
||||
public static readonly Error None = new(string.Empty, string.Empty);
|
||||
|
||||
public static Error Validation(string code, string message) => new(code, message, ErrorType.Validation);
|
||||
public static Error NotFound(string code, string message) => new(code, message, ErrorType.NotFound);
|
||||
public static Error Conflict(string code, string message) => new(code, message, ErrorType.Conflict);
|
||||
public static Error Unauthorized(string code, string message) => new(code, message, ErrorType.Unauthorized);
|
||||
public static Error Forbidden(string code, string message) => new(code, message, ErrorType.Forbidden);
|
||||
public static Error Failure(string code, string message) => new(code, message, ErrorType.Failure);
|
||||
}
|
||||
Reference in New Issue
Block a user