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

from StatusCode import BaseStatusCode, StatusCodeField


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'摄影师帐号未激活')


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 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'游客登录未开启')


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(402003, 'Not Group Admin', description=u'非群组管理员')

    NO_UPDATE_PERMISSION = StatusCodeField(402010, 'No Update Permission', description=u'没有更新权限')
    NO_LOCK_PERMISSION = StatusCodeField(402011, 'No Lock Permission', description=u'没有锁定权限')
    NO_UNLOCK_PERMISSION = StatusCodeField(402012, 'No Unlock Permission', description=u'没有解锁权限')
    NO_REMOVE_PERMISSION = StatusCodeField(402013, 'No Remove Permission', description=u'没有移除权限')
    NO_QUIT_PERMISSION = StatusCodeField(402014, 'No Quit Permission', description=u'没有退出权限')
    NO_PASS_PERMISSION = StatusCodeField(402015, 'No Pass Permission', description=u'没有通过权限')
    NO_REFUSE_PERMISSION = StatusCodeField(402016, 'No Refuse Permission', description=u'没有拒绝权限')
    NO_CLOSE_PERMISSION = StatusCodeField(402017, 'No Close Permission', description=u'没有关闭权限')
    NO_TRANSFER_PERMISSION = StatusCodeField(402018, 'No Transfer Permission', description=u'没有转移权限')
    NO_LOCATION_PERMISSION = StatusCodeField(402019, 'No Location Permission', description=u'没有地理位置权限')

    DUPLICATE_JOIN_REQUEST = StatusCodeField(402020, 'Duplicate Join Request', description=u'重复加群申请')
    JOIN_REQUEST_NOT_FOUND = StatusCodeField(402021, 'Join Request Not Found', description=u'加群申请不存在')

    COULD_HAVE_ONLY_ONE_ACTIVE_GROUP = StatusCodeField(402030, 'Could Have Only One Active Group', 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'飞图不存在')
    THUMB_UP_NOT_FOUND = StatusCodeField(402202, 'Thumb Up Not Found', description=u'未点赞')
    DUPLICATE_THUMB_UP = StatusCodeField(402203, 'Duplicate Thumb Up', 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'票据不存在')
