hyperf-chat/app/Constants/ResponseCode.php

35 lines
708 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
*/
2020-11-04 11:57:16 +08:00
namespace App\Constants;
/**
2020-12-03 16:22:55 +08:00
* HTTP 响应状态码枚举
*
* Class ResponseCode
* @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; // 接口处理成功
const FAIL = 305; // 接口处理失败
/**
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;
}