2020-11-04 11:57:16 +08:00
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|