# -*- coding: utf-8 -*-
from cgutil.i18nstr import I18NStr


class ExceptionStr(object):

    NO_PERMISSION = I18NStr('credit.ex.no_permission', u"无权限操作")
    INVALID_CREDIT_INVALID_DATE = I18NStr('credit.ex.invalid_credit_invalid_date', u"全局额度失效日期只能向后延长")
    OVERLAP_CREDIT_INVALID_DATE = I18NStr('credit.ex.overlap_credit_invalid_date', u"全局额度失效日期重复")
    ALREADY_EXIST_CREDIT_AMOUNT = I18NStr('credit.ex.already_exist_credit_amount', u"该时间段内已有额度，id为{id_list}")
    COMPANY_NOT_EXIST = I18NStr('credit.ex.company_not_exist', u"未查到公司信息")
    GROUP_NOT_EXIST = I18NStr('credit.ex.group_not_exist', u"未查到集团信息")
    CREDIT_AMOUNT_NOT_EXIST = I18NStr('credit.ex.credit_amount_not_exist', u"额度不存在")
    CHANGE_VALID_LT_AMOUNT_VALID = I18NStr('credit.ex.change_valid_lt_amount_valid', u"变更开始日期不能早于额度开始日期")
    CHANGE_INVALID_GT_AMOUNT_INVALID = I18NStr('credit.ex.change_invalid_gt_amount_invalid', u"变更结束日期不能晚于额度结束日期")
    CUSTOMER_EMPTY = I18NStr('credit.ex.customer_empty', u"客户不可为空")
    VALID_LT_NOW = I18NStr('credit.ex.valid_lt_now', u"生效时间必须大于等于当前时间")
    VALID_GT_INVALID = I18NStr('credit.ex.valid_gt_invalid', u"生效时间必须小于等于失效时间")
    WHITE_LIST_EXIST = I18NStr('credit.ex.white_list_exist', u"已存在该客户的白名单")
    ERROR_WHEN_GET_CUSTOMER = I18NStr('credit.ex.error_when_get_customer', u"获取客户信息异常")
    CUSTOMER_NOT_EXIST = I18NStr('credit.ex.customer_not_exist', u"没找到该客户")
    CAN_NOT_OBSOLETE = I18NStr('credit.ex.can_not_obsolete', u"当前状态不可终止")
    CREDIT_CHANGE_NOT_EXIST = I18NStr('credit.ex.credit_change_not_exist', u"额度变更不存在")
    COMPANY_NO_PERMISSION = I18NStr('credit.ex.company_no_permission', u"当前公司无查询权限")
    CUSTOMER_NO_PERMISSION = I18NStr('credit.ex.customer_no_permission', u"当前客户无查询权限")
    COMPANY_DATA_ERROR = I18NStr('credit.ex.company_data_error', u"公司数据错误")
    SYSTEM_ERROR = I18NStr('stocklab.ex.system_error', u"系统异常，请联系管理员。异常ID:{error_id}")
    VALID_DATE_LT_INVALID_DATE = I18NStr('credit.ex.valid_date_lt_invalid_date', u"失效日期不能大于生效日期")
    WHOLE_YEAR_DOMESTIC = I18NStr('credit.ex.whole_year_domestic', u"国内额度只支持整年")
    VALID_TIME_EARLIER_THAN_DATE = I18NStr('credit.ex.valid_time_earlier_than_date', u"生效时间必须小于等于失效时间")
    FIX_CREDIT_OVERSEA = I18NStr('credit.ex.fix_credit_oversea', u"海外只支持循环额度")
    CON_INFO_EMPTY = I18NStr('credit.ex.con_info_empty', u"合同信息不能为空")
    VALID_DATE_LT_NOW = I18NStr('credit.ex.valid_date_lt_now', u"生效日期必须大于等于当前时间")
    THRESHOLD_LT_0 = I18NStr('credit.ex.threshold_lt_0', u"账单阈值必须大于等于0")
    CREDIT_AMOUNT_LT_0 = I18NStr('credit.ex.credit_amount_lt_0', u"额度金额必须大于0")
    COMPANY_CREDIT_OVERSEA = I18NStr('credit.ex.company_credit_oversea', u"海外只支持公司额度")
    DATE_ILLEGAL = I18NStr('credit.ex.date_setting_illegal', u"额度的日期设置不合法")
    NOT_COMMON_CREDIT_DOMESTIC = I18NStr('credit.ex.not_common_credit_domestic', u'国内只支持通用额度')
    NO_BID_CREDIT_HAS_THRESHOLD = I18NStr('credit.ex.no_bid_credit_has_threshold', u'品牌额度不允许设置阈值')

    approval_entity_unfound = I18NStr('funds.credit.error.approval_entity_unfound', u"审批实体不存在")
    submit_approval_failed = I18NStr('funds.credit.error.submit_approval_failed', u"提交审批失败")
    step_under_operation = I18NStr('funds.credit.comm.current_approval_step', u"当前节点已经被操作")
    no_submit_permission = I18NStr('funds.credit.error.no_permission_create_type', u"无提交审批权限")
    no_grant_permission = I18NStr('funds.credit.error.no_grant_permission', u"无审批通过权限")
    no_reject_permission = I18NStr('funds.credit.error.no_reject_permission', u"无审批拒绝权限")
    no_suspend_permission = I18NStr('funds.credit.error.no_suspend_permission', u"无暂存代办权限")
    only_submitter_withdraw = I18NStr('funds.credit.error.only_submitter_withdraw', u"只有提交人才能撤回")
    approval_type_unsupport = I18NStr('funds.credit.error.approval_type_unsupport', u"审批类型不支持")
    step_no_exist = I18NStr('funds.credit.error.step_no_exist', u"节点已不存在")
    approval_status_error = I18NStr('funds.credit.error.approval_status_error', u"退款申请单审批状态异常")
    not_allow_html_tag = I18NStr('funds.credit.ex.not_allow_html_tag', u"不允许含有HTML标签")
    contain_illegal_code = I18NStr('funds.credit.ex.contain_illegal_code', u"含有非法字符")
    invalid_numb = I18NStr('funds.credit.ex.invalid_numb', u"无效的数字")
    adjust_amount_error = I18NStr('funds.credit.error.adjustment_amt_error', u"模型调整金额异常")
    evaluate_adjust_error = I18NStr('funds.credit.error.adjustment_amt_error', u"模型调整异常")
    not_support_new_model = I18NStr('', u"不支持新模型的同步")


class FieldStr(object):
    PAGE = I18NStr('credit.common.page', u"页数")
    CUSTOMER_CREDIT_STATUS = I18NStr('credit.field.customer_credit_status', u"客户信用额度状态")
    LIMIT = I18NStr('credit.common.limit', u"页码")
    VALID_DATE = I18NStr('credit.field.valid_date', u"生效日期")
    VALID_START_DATE = I18NStr('credit.field.valid_start_date', u"生效开始日期")
    VALID_END_DATE = I18NStr('credit.field.effective_end_date', u"生效结束日期")
    CREDIT_STATUS = I18NStr('credit.field.credit_status', u"授信状态")
    INVALID_DATE = I18NStr('credit.field.invalid_date', u"失效日期")
    INVALID_START_DATE = I18NStr('credit.field.invalid_start_date', u"失效开始日期")
    INVALID_END_DATE = I18NStr('credit.field.effective_end_date', u"失效结束日期")
    CREDIT_CHANGE_ID = I18NStr('credit.field.credit_change_id', u"额度变更ID")
    SUBJECT_RANGE = I18NStr('credit.field.subject_range', u"主体类型")
    CREDIT_AMOUNT = I18NStr('credit.field.credit_amount', u"额度金额")
    CREDIT_AMOUNT_ID = I18NStr('credit.field.credit_limit_id', u'额度ID')
    REGION = I18NStr('credit.common.region', u'地区')
    DOMESTIC = I18NStr('credit.field.domestic', u'国内')
    OVERSEAS = I18NStr('credit.field.overseas', u'海外')
    LOCAL_TIME = I18NStr('credit.field.local_time', u'当地时间')
    HOUR_DELTA = I18NStr('credit.field.hour_delta', u'时区差')
    PRICING_CATEGORY = I18NStr('funds.credit.field.coverd_types', u'额度作用范围')

    COMPANY_NAME = I18NStr('funds.credit.field.company_name', u"注册公司名称")
    EFFECTIVE = I18NStr('funds.credit.field.effect', u'生效中')
    THRESHOLD = I18NStr('funds.credit.field.threshold', u'账单阈值')
    SIGMA_ID = I18NStr('funds.credit.field.subject_id', u'主体ID')
    SIGMA_NAME = I18NStr('funds.credit.field.subject_name', u'主体名称')
    CREDIT_TYPE = I18NStr('funds.credit.field.credit_type', u"授信类型")
    CURRENCY_CODE = I18NStr('funds.credit.field.currency', u"币种")
    CONTRACT_ID = I18NStr('funds.credit.field.contract_no', u"合同ID")
    CUSTOMER_ID = I18NStr('funds.credit.field.customer_id', u'客户ID')
    START_DATE = I18NStr('funds.credit.field.start_date', u'开始日期')
    END_DATE = I18NStr('funds.credit.field.end_date', u'结束日期')

    REMARK = I18NStr('credit.common.remark', u'备注')

    entity_id = I18NStr('funds.credit.field.subject_id', u'实体ID')
    entity_type = I18NStr('funds.credit.field.subject_type', u'实体类型')
    timezone = I18NStr('funds.credit.comm.zone', u'Time Zone')
    model_code = I18NStr('funds.credit.field.model_code', u'Model code')
    model_name = I18NStr('funds.credit.field.model_name', u'Model name')
    submit_start_time = I18NStr('credit.field.valid_start_date', u'过滤开始时间')
    submit_end_time = I18NStr('credit.field.effective_end_date', u'过滤结束时间')
    remarks = I18NStr('funds.credit.field.remark', u'remark')
    approval_claim = I18NStr('funds.credit.action.claim', u"Claim")
    ref_id = I18NStr('', u'ref_id')
    task_id = I18NStr('', u'task_id')
    timezone_hours = I18NStr('', u'timezone_hours')
    evaluate_record_id = I18NStr('', u'evaluate_record_id')
    evaluate_record_status = I18NStr('', u'evaluate_record_status')
    evaluate_detail_id = I18NStr('', u'evaluate_detail_id')
    origin_amount = I18NStr('credit.field.credit_amount', u'当前额度')
    new_amount = I18NStr('funds.credit.field.evaluate_new_credit_line', u'新评估额度')
    adjust_amount = I18NStr('funds.credit.field.change_credit_line', u'Change in Creditline')
    adjust_details = I18NStr('', u'adjust_details')
    operator_id = I18NStr('', u'operator_id')
    operator_name = I18NStr('', u'operator_name')


class EnumStr(object):
    FIX_AMOUNT = I18NStr('funds.credit.field.restorable_credit', u"循环额度")
    TEMP_AMOUNT = I18NStr('funds.credit.field.temporary_credit', u"临时额度")
    OBSOLETE = I18NStr('funds.credit.field.abandoned', u"终止")
    VALID = I18NStr('funds.credit.field.valid', u'有效')
    COMPANY = I18NStr('funds.credit.field.company', u'公司')
    GROUP = I18NStr('funds.credit.field.group', u'集团')
    BID = I18NStr('funds.credit.field.credit_for_action', u'竞价广告')
    NO_BID = I18NStr('funds.credit.field.credit_for_branding', u'品牌广告')
    COMMON = I18NStr('funds.credit.field.credit_for_ALL', u'通用')

    op_type_sync = I18NStr('funds.credit.field.credit_line_transmission', u'Credit line transmission')
    op_type_adjust_amount = I18NStr('funds.credit.field.credit_line_adjust', u'额度金额调整')
    op_type_adjust_invalid_date = I18NStr('funds.credit.field.credit_invalid_date_adjust', u'Change credit invalid date')
    op_type_effect_evaluate_detail = I18NStr('funds.credit.field.credit_line_detail_effect', u'Credit detail is effective')

    approval_not_yet = I18NStr('funds.credit.comm.unsubmit_approval', u"Not Yet Submitted for Review")
    approval_complete = I18NStr('funds.credit.comm.approved', u"Approved")
    approval_reject = I18NStr('funds.credit.comm.rejected', u"Rejected")
    approval_suspend = I18NStr('funds.credit.action.suspend', u"Suspend")
    approval_claim = I18NStr('funds.credit.action.claim', u"Claim")
    approval_notify = I18NStr('', u"系统知会")
    approval_waiting = I18NStr('funds.credit.action.waiting_approval', u"Awaiting Review")
    approval_submit = I18NStr('funds.credit.action.submit_approval', u"Submit for Review")
    approval_stop = I18NStr('funds.credit.comm.end_approval', u"Review Termination")
    approval_ing = I18NStr('funds.credit.comm.in_approval', u"Processing")
    abandon = I18NStr('funds.credit.field.obsolete', u"作废")
    effect = I18NStr('funds.credit.field.effect', u"生效")

    credit_amount = I18NStr('funds.credit.field.overall_credit_amount', u"全局额度")
    credit_change = I18NStr('funds.credit.title.period_limit', u"区间额度")
    evaluate_record = I18NStr('credit.field.credit_amount', u"评估额度")


class TaskNameStr(object):
    la_agency_credit_approver1 = I18NStr('', 'la_agency_credit_approver1')
    la_agency_credit_approver2 = I18NStr('', 'la_agency_credit_approver2')
    region_credit_approver1 = I18NStr('', 'region_credit_approver1')
    region_credit_approver2 = I18NStr('', 'region_credit_approver2')
    local_credit_approver1 = I18NStr('', 'local_credit_approver1')
    local_credit_approver2 = I18NStr('', 'local_credit_approver2')
    auction_credit_approver1 = I18NStr('', 'auction_credit_approver1')
    auction_credit_approver2 = I18NStr('', 'auction_credit_approver2')
