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

from StatusCode import BaseStatusCode, StatusCodeField


class ProfileStatusCode(BaseStatusCode):
    """ 用户相关错误码 4000xx """
    PROFILE_NOT_FOUND = StatusCodeField(400001, 'Profile Not Found', description=u'用户不存在')


class CourseCodeStatusCode(BaseStatusCode):
    """ 课程兑换码相关错误码 4001xx """
    COURSE_CODE_NOT_FOUND = StatusCodeField(400101, 'Course Code Not Found', description=u'课程兑换码不存在')
    COURSE_CODE_HAS_EXCHANGED = StatusCodeField(400102, 'Course Code Has Exchanged', description=u'课程兑换码已兑换')


class CourseStatusCode(BaseStatusCode):
    """ 课程相关错误码 4002xx """
    COURSE_NOT_FOUND = StatusCodeField(400201, 'Course Not Found', 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'票据不存在')
