seaislee1209 6361c94204
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 7m8s
Build and Deploy Web / build-and-deploy (push) Successful in 2m32s
feat: 日报/周报月报分开接收人 + 人均产出只算中期提交人
- 日报推送12人(主管+组长+制片+股东)
- 周报/月报推送4人(仅股东+主管,含成本信息)
- 人均日产出分母改为只算有中期提交的人,与产出口径一致

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 21:31:45 +08:00

41 lines
1.4 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""应用配置"""
import os
from dotenv import load_dotenv
load_dotenv()
# 数据库:优先从 DB_HOST 等环境变量拼接 MySQL URL否则回退到 DATABASE_URL / SQLite
DB_HOST = os.getenv("DB_HOST", "")
if DB_HOST:
DB_USER = os.getenv("DB_USER", "airlabs_manage")
DB_PASSWORD = os.getenv("DB_PASSWORD", "")
DB_PORT = os.getenv("DB_PORT", "3306")
DB_NAME = os.getenv("DB_NAME", "airlabs_manage")
DATABASE_URL = f"mysql+pymysql://{DB_USER}:{DB_PASSWORD}@{DB_HOST}:{DB_PORT}/{DB_NAME}?charset=utf8mb4"
else:
DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///./airlabs.db")
# JWT 认证
SECRET_KEY = os.getenv("SECRET_KEY", "airlabs-project-secret-key-change-in-production")
ALGORITHM = "HS256"
ACCESS_TOKEN_EXPIRE_MINUTES = 60 * 24 * 90 # 90 天
# CORS
CORS_ORIGINS = os.getenv("CORS_ORIGINS", "*").split(",")
# 成本计算
WORKING_DAYS_PER_MONTH = 22
# 豆包 AI火山引擎 ARK
ARK_API_KEY = os.getenv("ARK_API_KEY", "")
ARK_MODEL = os.getenv("ARK_MODEL", "doubao-seed-1-8-251228")
ARK_BASE_URL = os.getenv("ARK_BASE_URL", "https://ark.cn-beijing.volces.com/api/v3")
# 飞书自建应用
FEISHU_APP_ID = os.getenv("FEISHU_APP_ID", "")
FEISHU_APP_SECRET = os.getenv("FEISHU_APP_SECRET", "")
# 报告接收人手机号
DAILY_REPORT_RECEIVERS = [p.strip() for p in os.getenv("DAILY_REPORT_RECEIVERS", "").split(",") if p.strip()]
REPORT_RECEIVERS = [p.strip() for p in os.getenv("REPORT_RECEIVERS", "").split(",") if p.strip()]