#!/usr/bin/env python3  
# -*- coding: utf-8 -*-  
"""
@Copyright (C) ansjer cop Video Technology Co.,Ltd.All rights reserved.
@AUTHOR: ASJRD018
@NAME: Ansjer
@software: PyCharm
@DATE: 2018/7/2 14:06
@Version: python3.6
@MODIFY DECORD:ansjer dev
@file: Conf.py
@Contact: chanjunkai@163.com
"""
# 主要静态变量配置文件
import datetime, os


DEBUG_MODE = 'DEV'
# MODE = 'PRO'
# 阿里云发邮箱
ALY_SES_ACCESS_NAME = 'message@dvema.com'
ALY_SES_ACCESS_PAW = 'SMtp123456'
ALY_SES_ACCESS_REPLYTO = '***'

# 发送邮件邮箱
SES_COMPANY_EMAIL = 'user_server@nsst.com'
AWS_SES_ACCESS_ID = 'AKIAJKPU23EU5QWHFPKQ'
AWS_SES_ACCESS_SECRET = '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'
AWS_SES_ACCESS_REGION = 'us-east-1'
AWS_BUCKET = 'ansjertest'
# 设定离线时间为5分钟
OFF_LINE_TIME_DELTA = 5

# token的secret
OAUTH_ACCESS_TOKEN_SECRET = 'a+jbgnw%@1%zy^=@dn62%'
OAUTH_REFRESH_TOKEN_SECRET = 'r+jbgnw%@1%zy^=@dn62%'
# access_token超时
# OAUTH_ACCESS_TOKEN_TIME = datetime.timedelta(hours=1)
OAUTH_ACCESS_TOKEN_TIME = datetime.timedelta(days=30)
# refresh_token超时
OAUTH_REFRESH_TOKEN_TIME = datetime.timedelta(days=30)
# 腾讯验证,短信发送
TX_PHONE_APP_ID = '1400052907'
TX_PHONE_APP_KEY = '7705976ca6e85fe7b86d6bc2d11f7783'

# 验证码超时时间
AuthCode_Expire = 600

# 根路径
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# uid token key
UID_TOKEN_KEY = 'c+565*j@%^'

# oss param
OSS_STS_ACCESS_KEY = 'LTAIyMkGfEdogyL9'
OSS_STS_ACCESS_SECRET = '71uIjpsqVOmF7DAITRyRuc259jHOjO'
OSS_ROLE_ARN = 'acs:ram::1901342792446414:role/stsoss'

# aws api key
AWS_ACCESS_KEY_ID = ['AKIA2MMWBR4DSFG67DTG', 'AKIA2E67UIMD45Y3HL53']  # 0国内， 1国外
AWS_SECRET_ACCESS_KEY = ['aI9gxcAKPmiGgPy9axrtFKzjYGbvpuytEX4xWweL', 'ckYLg4Lo9ZXJIcJEAKkzf2rWvs8Xth1FCjqiAqUw']
AWS_ARN = ['arn:aws-cn:s3', 'arn:aws:s3']


NGINX_RTMP_STAT = 'http://www.dvema.com/stat'
SERVER_DOMAIN = 'http://www.dvema.com/'
SERVER_DOMAIN_SSL = 'https://www.dvema.com/'
DOMAIN_HOST = 'www.dvema.com'
# SERVER_HOST = 'localhost'
PAYPAL_CRD = {
    "mode": "live",  # sandbox or live
    "client_id": "AdSRd6WBn-qLl9OiQHQuNYTDFSx0ZX0RUttqa58au8bPzoGYQUrt8bc6591RmH8_pEAIPijdvVYSVXyI",
    "client_secret": "ENT-J08N3Fw0B0uAokg4RukljAwO9hFHPf8whE6-Dwd8oBWJO8AWMgpdTKpfB1pOy89t4bsFEzMWDowm"
}
DETECT_PUSH_DOMAIN = 'http://push.dvema.com/'


JPUSH_CONFIG = {
    'com.ansjer.accloud_ab': {
        'Key': 'f0dc047e5e53fd14199de5b0',
        'Secret': 'aa7f7db33e9f0a7f3871aa1c'},
    'com.ansjer.adcloud_ab': {
        'Key': '76d97b535185114985608234',
        'Secret': 'c9a92b301043cc9c52778692'},
    'com.ansjer.zccloud_ab': {
        'Key': 'd9924f56d3cc7c6017965130',
        'Secret': '869d832d126a232f158b5987'},
    'com.ansjer.loocamccloud_ab': {
        'Key': 'd1cc44797b4642b0e05304fe',
        'Secret': 'c3e8b4ca8c576de61401e56a'},
    'com.ansjer.loocamdcloud_ab': {
        'Key': '76d97b535185114985608234',
        'Secret': 'c9a92b301043cc9c52778692'},
    'com.ansjer.zccloud_a': {
        'Key': '57de2a80d68bf270fd6bdf5a',
        'Secret': '3d354eb6a0b49c2610decf42'},
    'com.ansjer.accloud_a': {
        'Key': 'ff95ee685f49c0dc4013347b',
        'Secret': 'de2c20959f5516fdeeafe78e'},
    'com.ansjer.adcloud_a': {
        'Key': '2e47eb1aee9b164460df3668',
        'Secret': 'b9137d8d684bc248f1809b6d'},
    'com.ansjer.loocamccloud_a': {
        'Key': '23c9213215c7ca0ec945629b',
        'Secret': '81e4b1e859cc8387e2e6c431'},
    'com.ansjer.loocamdcloud_a': {
        'Key': '1dbdd60a16e9892d6f68a073',
        'Secret': '80a97690e7e043109059b403'},
    'com.ansjer.customizedb_a': {
        'Key': '9d79630aa49adfa291fe2568',
        'Secret': '4d8ff52f88136561875a0212'},
    'com.ansjer.customizedd_a': {
        'Key': '8fc4f495685bde53341ee25d',
        'Secret': 'f1da11fa466509fa2670fb66',
    }
}
# type =1
FCM_CONFIG = {
    'com.ansjer.zccloud_a': 'AAAAb9YP3rk:APA91bHu8u-CTpcd0g6lKPo0WNVqCi8jZub1cPPbSAY9AucT1HxlF65ZDUko9iG8q2ch17bwu9YWHpK1xI1gHSRXCslLvZlXEmHZC0AG3JKg15XuUvlFKACIajUFV-pOeGRT8tM6-31I',
    'com.ansjer.loocamccloud_a': 'AAAAb9YP3rk:APA91bFCgd-kbVmpK4EVpfdHH_PJZQCYTkOGnTZdIuBWEz2r7aMRsJYHOH3sB-rwcbaRWgnufTyjX9nGQxb6KxQbWVk4ah_H-M3IqGh6Mb60WQQAuR33V6g_Jes5pGL6ViuIxGHqVMaR',
    'com.ansjer.loocamdcloud_a': 'AAAAb9YP3rk:APA91bGw2I2KMD4i-5T7nZO_wB8kuAOuqgyqe5rxmY-W5qkpYEx9IL2IfmC_qf6B_xOyjIDDSjckvMo-RauN__SEoxvAkis7042GRkoKpw7cjZ_H8lC-d50PC0GclPzccrOGFusyKbFY',
    'com.ansjer.customizedb_a': 'AAAAb9YP3rk:APA91bE7kI4vcm-9h_CJNFlOZfc-xwP4Btn6AnjOrwoKV6fgYN7fdarkO76sYxVZiAbDnxsFfOJyP7vQfwyan6mdjuyD5iHdt_XgO22VqniC0vA1V4GJiCS8Tp7LxIX8JVKZl9I_Powt',
    'com.ansjer.customizeda_a': 'AAAAb9YP3rk:APA91bF0HzizVWDc6dKzobY9fsaKDK4veqkOZehDXshVXs8pEEvNWjR_YWbhP60wsRYCHCal8fWN5cECVOWNMMzDsfU88Ty2AUl8S5FtZsmeDTkoGntQOswBr8Ln7Fm_LAp1VqTf9CpM',
    'com.ansjer.customizedd_a': 'AAAAb9YP3rk:APA91bHkxOozJWBrlv3eNT0PgwosYENI9aM4Zuzd418cX-iKkpa1zFNC5MkNDKApx1KH4fhmAfaJ6IMRZ0nj5GIxCpstDYCaZWwgC7-etqfSxG5JAq8LOwJx0o_1tUZqwjIic8ztsg0o',
    'com.ansjer.adcloud_a': 'AAAAb9YP3rk:APA91bFm06w8b9OKQ0gz0iaWFuRqRIkvgAz6z7Gp3dBU_X-LNGJQd1hc1QR2W7QzBglF8SHtERA45a2lbdLRa5qv7hxfd6W_sJLBK7dA8jklsOQBvy505oUzTwMKWy4TwH-exps9KrhO',
    'com.ansjer.accloud_a': 'AAAAb9YP3rk:APA91bFm06w8b9OKQ0gz0iaWFuRqRIkvgAz6z7Gp3dBU_X-LNGJQd1hc1QR2W7QzBglF8SHtERA45a2lbdLRa5qv7hxfd6W_sJLBK7dA8jklsOQBvy505oUzTwMKWy4TwH-exps9KrhO',
    'com.ansjer.zccloud_ab': 'AAAAb9YP3rk:APA91bHu8u-CTpcd0g6lKPo0WNVqCi8jZub1cPPbSAY9AucT1HxlF65ZDUko9iG8q2ch17bwu9YWHpK1xI1gHSRXCslLvZlXEmHZC0AG3JKg15XuUvlFKACIajUFV-pOeGRT8tM6-31I',
}
SERVER_TYPE = os.environ.get('DJANGO_SETTINGS_MODULE')

APNS_CONFIG = {
    'com.ansjer.loocamccloud': {
        'pem_path': 'AnsjerPush/file/apns_pem/lcc-dev.pem',
    },
    'com.ansjer.zosidcloud': {
        'pem_path': 'AnsjerPush/file/apns_pem/zosidcloud-dev.pem',
    },
    'com.ansjer.customizedb': {
        'pem_path': 'AnsjerPush/file/apns_pem/customizedb-dev.pem',
    },
    'com.ansjer.customizeda': {
        'pem_path': 'AnsjerPush/file/apns_pem/customizeda-dev.pem',
    },
    'com.ansjer.zccloud': {
        'pem_path': 'AnsjerPush/file/apns_pem/zccloud-dev.pem',
    },
    'com.ansjer.accloud': {
        'pem_path': 'AnsjerPush/file/apns_pem/accloud-dev.pem',
    },
    'com.ansjer.customizedc':{
        'pem_path': 'AnsjerPush/file/apns_pem/customizedc.pem',
    }
}
APNS_MODE = 'dev'
REDIS_ADDRESS = '127.0.0.1'

if SERVER_TYPE == 'AnsjerPush.local_settings':
    from AnsjerPush.local_config import *
elif SERVER_TYPE == 'AnsjerPush.test_settings':
    from AnsjerPush.test_config import *
elif SERVER_TYPE == 'AnsjerPush.formal_settings':
    from AnsjerPush.formal_config import *

APNS_CODE = {
    -1: '只库存不推送',
    200: '推送成功',
    400: '请求有问题',
    403: '证书或Token有问题',
    405: '请求方式不正确, 只支持POST请求',
    410: '设备的Token与证书不一致'
}

JPUSH_CODE = {
    -1: '只库存不推送',
    200: '推送成功',
    400: '错误请求',
    401: '没有验证信息或者验证失败',
    403: '请求被拒绝',
    404: '资源不存在，请求的用户的不存在，请求的格式不被支持',
    405: '请求方法不合适',
    410: '请求的资源已下线',
    429: '请求超出了频率限制',
    500: '极光内部服务错误',
    502: '业务服务器下线了或者正在升级。请稍后重试',
    503: '服务暂时失效',
    504: '代理超时'
}

FCM_CODE = {
    -1: '只库存不推送',
    200: '推送成功',
    400: '无效数据',
    401: '没有验证信息或者验证失败'
}

APP_TYPE = {
    1: 'ios',
    2: 'android'
}