# -*- coding: utf-8 -*-

from StatusCode import BaseStatusCode, StatusCodeField


class SaleclerkStatusCode(BaseStatusCode):
    """ 店员相关错误码 5001xx """
    CLERK_NOT_FOUND = StatusCodeField(500101, 'Clerk Not Found', description=u'店员不存在')
    # 手机号
    CLERK_PHONE_ALREADY_EXISTS = StatusCodeField(500105, 'Clerk Phone Already Exists', description=u'手机号已经存在')
    # 状态
    CLERK_ALREADY_NOT_UNVERIFIED = StatusCodeField(500110, 'Clerk Already Not Unverified', description=u'店员帐号已激活')
    CLERK_NOT_ACTIVATED = StatusCodeField(500115, 'Clerk Not Activated', description=u'店员帐号未激活')
    CLERK_NOT_AUTH = StatusCodeField(500116, 'Clerk Not AUTH', description=u'店员帐号未认证')
    # 上传
    DUPLICATE_SUBMIT = StatusCodeField(500199, 'Duplicate Submit', description=u'重复提交')


class SalesResponsibilityStatusCode(BaseStatusCode):
    """ 销售担当相关错误码 5002xx """
    SR_NOT_FOUND = StatusCodeField(500201, 'SR Not Found', description=u'销售担当不存在')
    # 手机号
    SR_PHONE_ALREADY_EXISTS = StatusCodeField(500205, 'SR Phone Already Exists', description=u'手机号已经存在')


class ProductBrandStatusCode(BaseStatusCode):
    """ 品牌相关错误码 5010xx """
    BRAND_NOT_FOUND = StatusCodeField(501001, 'Brand Not Found', description=u'品牌不存在')
    BRAND_NOT_MATCH = StatusCodeField(501011, 'Brand Not Match', description=u'品牌不匹配')


class ProductModelStatusCode(BaseStatusCode):
    """ 型号相关错误码 5011xx """
    MODEL_NOT_FOUND = StatusCodeField(501101, 'Model Not Found', description=u'型号不存在')


class ProductDistributorStatusCode(BaseStatusCode):
    """ 经销商相关错误码 5012xx """
    DISTRIBUTOR_NOT_FOUND = StatusCodeField(501201, 'Distributor Not Found', description=u'经销商不存在')


class ProductMachineStatusCode(BaseStatusCode):
    """ 机器相关错误码 5013xx """
    SN_NOT_FOUND = StatusCodeField(501301, 'SN Not Found', description=u'序列号不存在')


class ProductCouponStatusCode(BaseStatusCode):
    """ 优惠券相关错误码 5014xx """
    COUPON_NOT_FOUND = StatusCodeField(501401, 'Coupon Not Found', description=u'优惠券不存在')

    COUPON_HAS_EXPIRED = StatusCodeField(501411, 'Coupon Has Expired', description=u'优惠券已过期')


class ProductStatusCode(BaseStatusCode):
    """ 产品相关错误码 5020xx """
    PRODUCT_NOT_FOUND = StatusCodeField(502001, 'Product Not Found', description=u'产品不存在')
    # 状态
    PRODUCT_HAS_USED = StatusCodeField(502011, 'Product Has Used', description=u'产品已使用')
    PRODUCT_NOT_USED = StatusCodeField(502012, 'Product Not Used', description=u'产品未使用')


class LensmanStatusCode(BaseStatusCode):
    """ 摄影师相关错误码 4000xx """
    LENSMAN_NOT_FOUND = StatusCodeField(400001, 'Lensman Not Found', description=u'摄影师不存在')
    # 密码
    LENSMAN_PASSWORD_ERROR = StatusCodeField(400002, 'Lensman Password Error', description=u'摄影师密码错误')
    # 手机号
    LENSMAN_PHONE_ALREADY_EXISTS = StatusCodeField(400005, 'Lensman Phone Already Exists', description=u'手机号已经存在')
    # 状态
    LENSMAN_ALREADY_NOT_UNVERIFIED = StatusCodeField(400010, 'Lensman Already Not Unverified', description=u'摄影师帐号已激活')
    LENSMAN_NOT_ACTIVATED = StatusCodeField(400015, 'Lensman Not Activated', description=u'摄影师帐号未激活')
    # 类别
    LENSMAN_TYPE_NOT_EXISTS = StatusCodeField(400020, 'Lensman Type Not Exists', description=u'摄影师类别不存在')


class TourGuideStatusCode(BaseStatusCode):
    """ 导游相关错误码 4001xx """
    TOURGUIDE_NOT_FOUND = StatusCodeField(400101, 'Tour Guide Not Found', description=u'导游不存在')
    # 密码
    TOURGUIDE_PASSWORD_ERROR = StatusCodeField(400102, 'Tour Guide Password Error', description=u'导游密码错误')
    # 手机号
    TOURGUIDE_PHONE_ALREADY_EXISTS = StatusCodeField(400105, 'Tour Guide Phone Already Exists', description=u'手机号已经存在')
    # 状态
    TOURGUIDE_ALREADY_NOT_UNVERIFIED = StatusCodeField(400110, 'Tour Guide Already Not Unverified', description=u'导游帐号已激活')
    TOURGUIDE_NOT_ACTIVATED = StatusCodeField(400115, 'Tour Guide Not Activated', description=u'导游帐号未激活')


class AdministratorStatusCode(BaseStatusCode):
    """ 操作员相关错误码 4002xx """
    ADMINISTRATOR_NOT_FOUND = StatusCodeField(400201, 'Administrator Not Found', description=u'管理员不存在')
    # 密码
    ADMINISTRATOR_PASSWORD_ERROR = StatusCodeField(400202, 'Administrator Password Error', description=u'管理员密码错误')
    # 手机号
    ADMINISTRATOR_PHONE_ALREADY_EXISTS = StatusCodeField(400205, 'Administrator Phone Already Exists', description=u'管理员手机号已经存在')
    # 状态
    ADMINISTRATOR_NOT_ACTIVATED = StatusCodeField(400215, 'Administrator Not Activated', description=u'管理员未激活')
    ADMINISTRATOR_HAS_DISABLED = StatusCodeField(400216, 'Administrator Has Disabled', description=u'管理员已禁用')
    ADMINISTRATOR_HAS_DELETED = StatusCodeField(400217, 'Administrator Has Deleted', description=u'管理员已删除')
    # 管理员
    MAINTENANCE_NOT_FOUND = StatusCodeField(400251, 'Maintenance Not Found', description=u'核销员不存在')


class OperatorStatusCode(BaseStatusCode):
    """ 操作员相关错误码 4003xx """
    OPERATOR_NOT_FOUND = StatusCodeField(400301, 'Operator Not Found', description=u'操作员不存在')
    # 密码
    OPERATOR_PASSWORD_ERROR = StatusCodeField(400302, 'Operator Password Error', description=u'操作员密码错误')
    # 手机号
    OPERATOR_PHONE_ALREADY_EXISTS = StatusCodeField(400305, 'Operator Phone Already Exists', description=u'操作员手机号已经存在')
    # 状态
    OPERATOR_NOT_ACTIVATED = StatusCodeField(400315, 'Operator Not Activated', description=u'操作员未激活')
    OPERATOR_HAS_DISABLED = StatusCodeField(400316, 'Operator Has Disabled', description=u'操作员已禁用')
    OPERATOR_HAS_DELETED = StatusCodeField(400317, 'Operator Has Deleted', description=u'操作员已删除')


class UserStatusCode(BaseStatusCode):
    """ 用户相关错误码  4005xx """
    USER_NOT_FOUND = StatusCodeField(400501, 'User Not Found', description=u'用户不存在')
    USER_PASSWORD_ERROR = StatusCodeField(400502, 'User Password Error', description=u'用户密码错误')
    USERNAME_HAS_REGISTERED = StatusCodeField(400503, 'Username Has Registered', description=u'用户名已注册')
    # 游客
    GUEST_NOT_ALLOWED = StatusCodeField(400511, 'Guest Not ALLOWED', description=u'游客登录未开启')
    # 身份
    USER_NOT_LENSMAN = StatusCodeField(400521, 'User Not Lensman', description=u'用户非摄影师')
    USER_NOT_TOURGUIDE = StatusCodeField(400522, 'User Not Tourguide', description=u'用户非导游')


class PhoneStatusCode(BaseStatusCode):
    """ 手机相关错误码  4006xx """
    PHONE_NOT_FOUND = StatusCodeField(400601, 'Phone Not Found', description=u'手机不存在')


class WechatStatusCode(BaseStatusCode):
    """ 微信相关错误码  4007xx """
    WECHAT_NOT_FOUND = StatusCodeField(400701, 'Wechat Not Found', description=u'微信不存在')
    UNIONID_NOT_FOUND = StatusCodeField(400702, 'Unionid Not Found', description=u'微信 UNIONID 不存在')
    OPENID_NOT_FOUND = StatusCodeField(400703, 'OPENID Not Found', description=u'微信 OPENID 不存在')


class PhotoStatusCode(BaseStatusCode):
    """ 照片相关错误码 4010xx """
    PARAMS_ERROR = StatusCodeField(401001, 'Params Error', description=u'参数错误')


class GroupStatusCode(BaseStatusCode):
    """ 群组/团相关错误码 4020xx """
    GROUP_NOT_FOUND = StatusCodeField(402001, 'Group Not Found', description=u'群组不存在')
    GROUP_HAS_LOCKED = StatusCodeField(402002, 'Group Has Locked', description=u'群组已锁定')
    # 管理员
    NOT_GROUP_ADMIN = StatusCodeField(402010, 'Not Group Admin', description=u'非群组管理员')
    NOT_GROUP_SUBADMIN = StatusCodeField(402011, 'Not Group Sub Admin', description=u'非群组协同管理员')
    ADMIN_CANNOT_HANDLE_SELF = StatusCodeField(402012, 'Admin Cannot Handle Self', description=u'群组管理员无法操作自身')
    # 旅行团
    ONLY_ONE_ACTIVE_GROUP_ALLOWED = StatusCodeField(402040, 'Only One Active Group Allowed', description=u'只能创建一个活跃团')
    ACTIVE_GROUP_NOT_FOUND = StatusCodeField(402041, 'Active Group Not Found', description=u'活跃团不存在')
    GROUP_HAS_ENDED = StatusCodeField(402042, 'Group Has Ended', description=u'群组已结束')
    # 其他
    GROUP_PHOTO_NOT_EMPTY = StatusCodeField(402099, 'Group Photo Not Empty', description=u'群组照片不为空')


class GroupUserStatusCode(BaseStatusCode):
    """ 群组/团用户相关错误码 4021xx """
    GROUP_USER_NOT_FOUND = StatusCodeField(402101, 'Group User Not Found', description=u'群组用户不存在')
    GROUP_USER_HAS_DELETED = StatusCodeField(402102, 'Group User Has Deleted', description=u'群组用户被移除')
    # 旅行团
    USER_HAS_NOT_JOIN_GROUP = StatusCodeField(402131, 'User Has Not Join Group', description=u'用户未加入旅行团')


class GroupPhotoStatusCode(BaseStatusCode):
    """ 群组照片（飞图）相关错误码 4022xx """
    GROUP_PHOTO_NOT_FOUND = StatusCodeField(402201, 'Group Photo Not Found', description=u'飞图不存在')
    # 上传
    DUPLICATE_UPLOAD = StatusCodeField(402210, 'Duplicate Upload', description=u'重复上传')
    # 点赞
    THUMB_UP_NOT_FOUND = StatusCodeField(402220, 'Thumb Up Not Found', description=u'未点赞')
    DUPLICATE_THUMB_UP = StatusCodeField(402221, 'Duplicate Thumb Up', description=u'重复点赞')
    # 评论
    COMMENT_CONTENT_EMPTY = StatusCodeField(402230, 'Comment Content Empty', description=u'评论内容为空')


class ScreenStatusCode(BaseStatusCode):
    """ 群组/团相关错误码 4030xx """
    QRCODE_NOT_SCAN = StatusCodeField(403001, 'QRCode Not Scan', description=u'二维码未扫描')


class OrderStatusCode(BaseStatusCode):
    """ 订单／支付相关错误码 4040xx """
    WX_UNIFIED_ORDER_FAIL = StatusCodeField(404000, 'WX Unified Order Fail', description=u'微信统一下单失败')
    WX_ORDER_NOT_FOUND = StatusCodeField(404001, 'WX Order Not Found', description=u'订单不存在')
    WX_ORDER_NOT_PAY = StatusCodeField(404002, 'WX Order Not Pay', description=u'订单未支付')
    WX_ORDER_PAYING = StatusCodeField(404003, 'WX Order Paying', description=u'订单支付中')
    WX_ORDER_PAY_FAIL = StatusCodeField(404009, 'WX Order Pay Fail', description=u'微信支付失败')
    SIGN_CHECK_FAIL = StatusCodeField(404010, 'Sign Check Fail', description=u'签名校验失败')
    FEE_CHECK_FAIL = StatusCodeField(404011, 'FEE Check Fail', description=u'金额校验失败')
    NO_DETAIL_PERMISSION = StatusCodeField(404015, 'No Detail Permission', description=u'无详情权限')
    WX_ORDER_PAID_ALREADY_EXISTS = StatusCodeField(404020, 'WX Order Paid Already Exists', description=u'照片已购买')


class PayStatusCode(BaseStatusCode):
    """ 支付相关错误码 4041xx """


class WithdrawStatusCode(BaseStatusCode):
    """ 提现相关错误码 4042xx """
    BALANCE_NOT_ENOUGH = StatusCodeField(404200, 'Balance Not Enough', description=u'提现金额不足')


class MessageStatusCode(BaseStatusCode):
    """ 消息相关错误码 4090xx """
    MESSAGE_NOT_FOUND = StatusCodeField(409001, 'Message Not Found', description=u'消息不存在')


class TokenStatusCode(BaseStatusCode):
    """ 票据相关错误码 4090xx """
    TOKEN_NOT_FOUND = StatusCodeField(409901, 'Token Not Found', description=u'票据不存在')
    TOKEN_HAS_EXPIRED = StatusCodeField(409911, 'Token Has Expired', description=u'票据过期，请刷新重扫二维码')


class PermissionStatusCode(BaseStatusCode):
    """ 4099xx 权限相关错误码 """
    PERMISSION_DENIED = StatusCodeField(409900, 'Permission Denied', description=u'权限不足')
