初始化提交
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
<?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;
|
||||
}
|
||||
Reference in New Issue
Block a user