hyperf-chat/app/Constants/ResponseCode.php

26 lines
402 B
PHP
Raw Normal View History

2020-11-04 11:57:16 +08:00
<?php
2021-09-11 12:41:28 +08:00
declare(strict_types=1);
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 响应状态码枚举
*
* @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;
}