"""
估值分析模块配置文件
"""

import os
from pathlib import Path

# 数据库配置
DB_CONFIG = {
    'host': '192.168.18.199',
    'port': 3306,
    'user': 'root',
    'password': 'Chlry#$.8',
    'database': 'db_gp_cj'
}
# redis配置
REDIS_CONFIG = {
    'host': '192.168.18.208',
    'port': 6379,
    'password': 'wlkj2018',
    'db': 13,
    'socket_timeout': 5
}
# 创建数据库连接URL
DB_URL = f"mysql+pymysql://{DB_CONFIG['user']}:{DB_CONFIG['password']}@{DB_CONFIG['host']}:{DB_CONFIG['port']}/{DB_CONFIG['database']}"

# MongoDB配置
MONGO_CONFIG = {
    'host': '192.168.18.75',
    'port': 27017,
    'db': 'judge',
    'username': 'root',
    'password': 'wlkj2018',
    'collection': 'wind_financial_analysis'
}
# MongoDB配置
MONGO_CONFIG2 = {
    'host': '192.168.20.110',
    'port': 27017,
    'db': 'judge',
    'username': 'root',
    'password': 'wlkj2018',
    'collection': 'wind_financial_analysis'
}

# 项目根目录
ROOT_DIR = Path(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))

# 结果输出目录
OUTPUT_DIR = ROOT_DIR / "results" / "valuation_analysis"

# 确保输出目录存在
os.makedirs(OUTPUT_DIR, exist_ok=True)

# 日志配置
LOG_FILE = ROOT_DIR / "logs" / "valuation_analysis.log"

# 确保日志目录存在
os.makedirs(LOG_FILE.parent, exist_ok=True) 