2023-02-17 17:10:16 +08:00

106 lines
2.0 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
declare(strict_types=1);
namespace App\Constants;
use Hyperf\Constants\AbstractConstants;
use Hyperf\Constants\Annotation\Constants;
#[Constants]
class HttpEnumCode extends AbstractConstants
{
/* -------------------------------200成功请求---------------------------------- */
/**
* @Message("成功")
*/
const HTTP_SUCCESS = 200;
/**
* @Message("失败")
*/
const HTTP_ERROR = -1;
/**
* @Message("用户状态异常")
*/
const USER_STATUS_ERROR = 201;
/**
* @Message("用户已被禁用")
*/
const USER_STATUS_DISABLE = 202;
/**
* @Message("手机号超出规定时间内最大获取次数,请您稍后再试")
*/
const PHONE_MAXIMUM = 203;
/**
* @Message("验证码错误")
*/
const CODE_ERROR = 204;
/**
* @Message("验证码已过期")
*/
const CODE_EXPIRED = 205;
/* -------------------------------400客户端错误---------------------------------- */
/**
* @Message("错误请求")
*/
const CLIENT_HTTP_ERROR = 400;
/**
* @Message("未授权")
*/
const CLIENT_HTTP_UNAUTHORIZED = 401;
/**
* @Message("禁止请求")
*/
const HTTP_PROHIBIT = 403;
/**
* @Message("token错误/无效")
*/
const TOKEN_ERROR = 405;
/**
* @Message("token过期")
*/
const TOKEN_EXPTIRED = 406;
/**
* @Message("手机号格式错误")
*/
const MOBILE_FORMAT_ERROR = 407;
/**
* @Message("日期格式错误")
*/
const DATE_FORMAT_ERROR = 408;
/* -------------------------------500服务端错误---------------------------------- */
/**
* @Message("服务器异常")
*/
const SERVER_ERROR = 500;
/**
* @Message("微信授权失败")
*/
const GET_WX_ERROR = 501;
/**
* @Message("微信授权过期")
*/
const WX_CODE_ERROR = 502;
/**
* @Message("短信发送失败")
*/
const CODE_FAIL = 503;
}