# encoding=utf-8


class ErrorCode:
    ERROR_UNKNOWN = (1000, '未知错误')
    ERROR_METHOD_ERROR = (1001, '请求方法不允许')
    ERROR_INVALID_PARAM = (1002, '参数错误')
    ERROR_DB_ERROR = (1003, '数据库错误')
    ERROR_NOT_ALLOWED = (1004, '操作不允许')
    ERROR_NETWORK_ERROR = (1005, '网络错误')
    ERROR_INVALID_THEME = (1006, '无效主题')
    ERROR_PASSWORD_NEED_CHANGE = (1007, '密码需要更改')
    ERROR_VERIFICATION_CODE = (1008, '二次验证错误')
    ERROR_CORE_FULL_LOAD = (1009, '抽取人脸特征服务压力过大，请重试')
    ERROR_BAD_IMAGE = (1010, '图片文件格式不正确')
    ERROR_CORE_DOWN = (1011, 'core down')

    # common
    ERROR_USER_NOT_EXIST = (2000, '用户不存在')
    ERROR_GROUP_NOT_EXIST = (2001, 'Group 不存在')
    ERROR_GROUP_ALREADY_EXIST = (2002, 'Group 已存在')
    ERROR_CAMERA_NOT_EXIST = (2003, '相机不存在')
    ERROR_CORE_NOT_EXIST = (2004, 'Core 不存在')
    ERROR_SUBJECT_NOT_EXIST = (2005, '用户不存在')
    ERROR_PHOTO_NOT_EXIST = (2006, '照片不存在')
    ERROR_BOX_NOT_EXIST = (2007, '主机不存在')
    ERROR_SCREEN_NOT_EXIST = (2008, '屏幕不存在')
    ERROR_COMPANY_NOT_EXIST = (2009, '公司不存在')
    ERROR_EVENT_NOT_EXIST = (2010, '历史记录不存在')
    ERROR_USERNAME_EXISTED = (2011, '用户名已存在')
    ERROR_COMPANY_ALREADY_EXIST = (2012, '公司已存在')
    ERROR_DISPLAY_DEVICE_NOT_EXIST = (2013, '设备不存在，请刷新')

    ERROR_FANGKEJI_NOT_EXIST = (2105, '访客机不存在')
    ERROR_DISABLED_FANGKEJI  = (2106, '访客机已经被禁用')
    ERROR_INTERVIEWSUBJECT_NOT_EXIST = (2107, '拜访的用户不存在')
    ERROR_SMS_HTTP_FAILD = (2108, '短信发送失败')
    ERROR_DEVICEID_EXIST = (2109, 'DevicdID已经被注册')
    ERROR_FANGKEJI_NOT_MATCH = (2110, '用户没有此访客机使用权限')
    ERROR_FANGKEJI_PHOTOID_ERROR = (2111, '错误的photo_id')
    
    ERROR_BOX_EXISTED = (20011, '主机已经存在')
    ERROR_BOX_BINDED = (20012, '主机已绑定')
    ERROR_BOX_NOT_BINDED = (20013, '主机未绑定')
    ERROR_BOX_NOT_MATCH_USER = (20014, '主机与用户公司不符')

    ERROR_SUBJECT_ALREADY_EXISTS = (20110, '姓名已存在')
    ERROR_SUBJECT_PHOTO_FULL = (20120, '照片已满')
    ERROR_EXCEL_INVALID = (20130, 'Excel 包含错误')
    ERROR_FILE_NOT_EXIST = (20140, '文件不存在')
    ERROR_FILE_FORMAT_ERROR = (20141, '文件格式错误')
    ERROR_EMAIL_EXISTED = (20150, '邮箱已存在')
    ERROR_PERMISSION_DENIED = (20160, '权限不足')
    ERROR_PHOTO_OVERSIZE = (20170, '上传图片过大')
    ERROR_PHOTO_UNDERSIZE = (20171, '上传图片过小')


    # auth
    ERROR_PASSWORD_ERROR = (3000, '密码不正确')
    ERROR_CAPTCHAS_ERROR = (3001, '验证码不正确')
    ERROR_PASSWORD_INCONSISTENT = (3002, '两次密码不一致')
    ERROR_NEED_LOGIN = (3003, '请登录')
    ERROR_NOT_BIND_THIS_BOX = (3004, '该账号未绑定本主机')

    ERROR_WEATHER_ERROR = (4001, '获取天气信息失败')

    ERROR_FACE_NO_DETECTED = (5000, '未检测到人脸')
    ERROR_CAMERA_CONFIG_INCORRECT = (5001, '摄像头配置不正确')
    ERROR_JSON_INVALID = (5002, '不是有效的 JSON 格式')
    ERROR_DUPLICATED = (5003, '名称已存在')
    ERROR_FACE_LOW_QUALITY = (5004, '人脸质量太低')
    ERROR_FACE_BRIGHTNESS_LOW = (5005, '人脸的亮度过低')
    ERROR_FACE_BRIGHTNESS_HIGH = (5006, '人脸的亮度过高')
    ERROR_FACE_STD_DEVIATION_HIGH = (5007, '人脸的亮度不均匀 ，请提供脸部光照均匀的图片')
    ERROR_FACE_PITCH_HIGH = (5008, '人脸角度过大，请提供正脸图片')
    ERROR_FACE_ROLL_HIGH = (5009, '人脸角度过大，请提供正脸图片')
    ERROR_FACE_YAW_HIGH = (5010, '人脸角度过大，请提供正脸图片')
    ERROR_FACE_BLURNESS_HIGH = (5011, '人脸不清晰，请提供清晰人脸图片')
    ERROR_FACE_SUNGLASS = (5012, '眼部有遮挡，请提供无遮挡的人脸图片')
    ERROR_FACE_SIZE_NOT_ENOUGH = (5013, '人脸过小，请提供足够像素的人脸图片')
    ERROR_FACE_GLASS = (5014, '眼部有遮挡，请提供无遮挡的人脸图片')
    ERROR_FACE_MONOCHROMIC = (5015, '请提供彩色人脸图片')
    ERROR_FACE_OUT_OF_BOUNDARY = (5016, '脸部缺失，请提供完整的人脸图片')

    ERROR_DELETING_SCREEN = (6000, '相机正在删除中,请稍后刷新页面查看')
    ERROR_PASSWORD_ERROR_TOO_MANY_TIMES = (6001, '密码错误次数过多,请10分钟后重试')
    ERROR_PASSWORD_ERROR_WAITING = (6002, '由于您连续输错3次密码,账号已经锁定,请等待10分钟再登陆')

    ERROR_ORGANIZATION_ALREADY_EXIST = (6013, '组织已存在')
    ERROR_ORGANIZATION_NOT_EXIST = (6014, ' 组织不存在')
    ERROR_COMPANY_NOT_IN_ORGANIZATION = (6015, '公司不在组织内')
    ERROR_USER_NOT_BIND_COMPANY = (6016, '用户未绑定公司')
