# -*- coding: utf-8 -*-
"""
ABA Report 配置文件
部署时只需修改 DATA_URL 和 SITES
"""

# ======================== 定时任务配置 ========================
# 每周任务：周日 23:00 执行（day_of_week: 'sun'=周日, 'mon'=周一, 'tue', 'wed', 'thu', 'fri', 'sat'）
WEEKLY_DAY_OF_WEEK = 'sun'
WEEKLY_HOUR = 18
WEEKLY_MINUTE = 0

# 每月任务：每月1号 22:00 执行（比周任务 23:00 早一小时，避免冲突）
MONTHLY_DAY = 1
MONTHLY_HOUR = 22
MONTHLY_MINUTE = 0

# 失败后最多重试次数（周和月通用）
MAX_RETRY_DAYS = 2
# 每次重试间隔（分钟）——在 [MIN, MAX] 之间随机取一个值，避免固定间隔
RETRY_INTERVAL_MIN_MINUTES = 30
RETRY_INTERVAL_MAX_MINUTES = 60

# ======================== 部署配置========================
# 电脑A:
DATA_URL = "https://sellercentral.amazon.com/brand-analytics/dashboard/top-search-terms"
SITES = ["US"]
# 电脑B:
# DATA_URL = "https://sellercentral.amazon.co.uk/brand-analytics/dashboard/top-search-terms"
# SITES = ["UK", "DE", "ES", "FR", "IT"]


# ======================== 站点映射配置 ========================
# 站点代码 → countryPicker 下拉框的 value（小写，用于页面切换国家）
SITE_PICKER_MAP = {
    "US": "us",
    "UK": "gb",
    "DE": "de",
    "ES": "es",
    "FR": "fr",
    "IT": "it",
    "NL": "nl",
}

# 站点代码 → 国家英文全称（用于存数据库 country_name 字段）
SITE_COUNTRY_NAME = {
    "US": "United States",
    "UK": "United Kingdom",
    "DE": "Germany",
    "ES": "Spain",
    "FR": "France",
    "IT": "Italy",
    "NL": "Netherlands",
}

# 站点代码 → Download Manager 页面 Country 列显示的国家缩写（大写）
SITE_DM_COUNTRY = {
    "US": "US",
    "UK": "GB",
    "DE": "DE",
    "ES": "ES",
    "FR": "FR",
    "IT": "IT",
    "NL": "NL",
}
