<?php
/**
 * Created by PhpStorm.
 * User: qiuzijian
 * Date: 2021-04-25
 * Time: 10:41
 */

namespace App\Enum;

class ApiEnum
{
    //接口通用返回状态码
    const STATUS_CODE_SUCCESS = '0000';  //成功
    const STATUS_CODE_FAIL    = '1001';  //网络错误(默认异常返回)
    const STATUS_CODE_EMPTY   = '1002';  //必传参数不能为空

    //接口通用返回信息
    const RETURN_MSG_SUCCESS = 'SUCCESS';
    const RETURN_MSG_FAIL    = '网络错误';
    const RETURN_MSG_EMPTY   = '必传参数不能为空';

    //转义接口返回码 => 接口返回信息
    const TRANSFER_API_MSG = [
        self::STATUS_CODE_SUCCESS => self::RETURN_MSG_SUCCESS,
        self::STATUS_CODE_FAIL    => self::RETURN_MSG_FAIL,
        self::STATUS_CODE_EMPTY   => self::RETURN_MSG_EMPTY,
    ];

    //api返回信息
    const RETURN_SUCCESS             = '成功';
    const NO_CAMERA_URL              = '视频播放链接不存在';
    const EASY_DAWIN_REQUEST_FAIL    = '请求流媒体服务器失败';
    const HK_REQUEST_FAIL            = '请求海康视频服务器失败';
    const LECHANGE_REQUEST_FAIL      = '请求视频服务器失败';
    const NONEXISTENT_VIDEO_RECORDER = '不存在的视频服务器来源';
}