namespace TakeoutSaaS.Shared.Abstractions.Constants;

/// <summary>
/// 统一错误码常量。
/// </summary>
public static class ErrorCodes
{
    /// <summary>
    /// 请求参数错误。
    /// </summary>
    public const int BadRequest = 400;

    /// <summary>
    /// 未授权访问。
    /// </summary>
    public const int Unauthorized = 401;

    /// <summary>
    /// 权限不足。
    /// </summary>
    public const int Forbidden = 403;

    /// <summary>
    /// 资源未找到。
    /// </summary>
    public const int NotFound = 404;

    /// <summary>
    /// 资源冲突。
    /// </summary>
    public const int Conflict = 409;

    /// <summary>
    /// 校验失败。
    /// </summary>
    public const int ValidationFailed = 422;

    /// <summary>
    /// 服务器内部错误。
    /// </summary>
    public const int InternalServerError = 500;

    /// <summary>
    /// 业务自定义错误（10000+）。
    /// </summary>
    public const int BusinessError = 10001;
}
