- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.php
More file actions
Latest commit
34 lines (29 loc) · 632 Bytes
/
Copy pathcode.php
File metadata and controls
34 lines (29 loc) · 632 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
/**
* @Author Cryven
* @Date 2018-10-23 15:19:56
*/
/**
* API 接口状态码定义
*
* 主要定义为以下几种类型:
* 1. 客户端-非法参数
* 2. 服务端-数据为空
* 3. (业务)操作失败
* 4. 权限(文件,登录等)
* 5. 成功/失败
*/
class Code
{
/** 成功&失败 **/
constSUCCESS = 0;
constFAILED = 1;
/** 非法参数 1001~1999 **/
constPARAM_INVALID = 1001;
/** 数据为空 **/
constDATA_NOT_FOUND = 2001;
/** 操作失败 **/
constOPERATION_FAILED = 3001;
/** 权限不足 **/
constPERMISSION_NOT_ALLOWED = 4001;
}