hyperf-chat/app/Constants/ResponseCode.php

37 lines
715 B
PHP
Raw Normal View History

2020-11-04 11:57:16 +08:00
<?php
2020-12-26 21:33:40 +08:00
/**
*
* This is my open source code, please do not use it for commercial applications.
*
* For the full copyright and license information,
* please view the LICENSE file that was distributed with this source code
*
* @author Yuandong<837215079@qq.com>
* @link https://github.com/gzydong/hyperf-chat
*/
2021-04-20 16:30:57 +08:00
2020-11-04 11:57:16 +08:00
namespace App\Constants;
/**
2020-12-03 16:22:55 +08:00
* HTTP 响应状态码枚举
*
* Class ResponseCode
2021-04-20 16:30:57 +08:00
*
2020-12-03 16:22:55 +08:00
* @package App\Constants
2020-11-04 11:57:16 +08:00
*/
2020-12-03 16:22:55 +08:00
class ResponseCode
2020-11-04 11:57:16 +08:00
{
const SUCCESS = 200; // 接口处理成功
2021-04-20 16:30:57 +08:00
const FAIL = 305; // 接口处理失败
2020-11-04 11:57:16 +08:00
/**
2020-12-03 16:22:55 +08:00
* Server Error
2020-11-04 11:57:16 +08:00
*/
const SERVER_ERROR = 500;
/**
2020-12-03 16:22:55 +08:00
* 请求数据验证失败!
2020-11-04 11:57:16 +08:00
*/
const VALIDATION_ERROR = 301;
}