# =====================================================
# POSTGRESQL DATABASE - Local Development
# =====================================================
DATABASE_URL=postgresql://bmc_hub:bmc_hub@postgres:5432/bmc_hub

# Database credentials (bruges af docker-compose)
POSTGRES_USER=bmc_hub
POSTGRES_PASSWORD=bmc_hub
POSTGRES_DB=bmc_hub
POSTGRES_PORT=5433

# =====================================================
# API CONFIGURATION
# =====================================================
API_HOST=0.0.0.0
API_PORT=8001
API_RELOAD=true

# =====================================================
# SECURITY
# =====================================================
SECRET_KEY=change-this-in-production-use-random-string
CORS_ORIGINS=http://localhost:8000,http://localhost:3000

# =====================================================
# LOGGING
# =====================================================
LOG_LEVEL=INFO
LOG_FILE=logs/app.log

# =====================================================
# GITHUB/GITEA REPOSITORY (Optional - for reference)
# =====================================================
# Repository: https://g.bmcnetworks.dk/ct/bmc_hub
GITHUB_REPO=ct/bmc_hub

# =====================================================
# e-conomic Integration (Optional)
# =====================================================
# Get credentials from e-conomic Settings -> Integrations -> API
ECONOMIC_API_URL=https://restapi.e-conomic.com
ECONOMIC_APP_SECRET_TOKEN=wy8ZhYBLsKhx8McirhvoBR9B6ILuoYJkEaiED5ijsA8
ECONOMIC_AGREEMENT_GRANT_TOKEN=5AhipRpMpoLx3uklPMQZbtZ4Zw4mV9lDuFI264II0lE

# 🚨 SAFETY SWITCHES - Beskytter mod utilsigtede ændringer
ECONOMIC_READ_ONLY=true   # Set to false ONLY after testing
ECONOMIC_DRY_RUN=true     # Set to false ONLY when ready for production writes

# =====================================================
# vTiger Cloud Integration (Required for Subscriptions)
# =====================================================
VTIGER_URL=https://bmcnetworks.od2.vtiger.com
VTIGER_USERNAME=ct@bmcnetworks.dk
VTIGER_API_KEY=bD8cW8zRFuKpPZ2S

# =====================================================
# Simply-CRM / Old vTiger On-Premise (Legacy)
# =====================================================
# Old vTiger installation - leave empty if not used
OLD_VTIGER_URL=https://bmcnetworks.simply-crm.dk
OLD_VTIGER_USERNAME=ct
OLD_VTIGER_API_KEY=b00ff2b7c08d591

# =====================================================
# Time Tracking Module Settings
# =====================================================
TIMETRACKING_DEFAULT_HOURLY_RATE=1200.00
TIMETRACKING_AUTO_ROUND=true
TIMETRACKING_ROUND_INCREMENT=0.5
TIMETRACKING_ROUND_METHOD=up

# Time Tracking Safety Switches
TIMETRACKING_VTIGER_READ_ONLY=true
TIMETRACKING_VTIGER_DRY_RUN=true
TIMETRACKING_ECONOMIC_READ_ONLY=false
TIMETRACKING_ECONOMIC_DRY_RUN=false

# =====================================================
# Simply-CRM (Separate CRM System)
# =====================================================
# Simply-CRM er et separat system fra vTiger Cloud
# Find credentials i Simply-CRM: Settings → My Preferences → Webservices
SIMPLYCRM_URL=https://bmcnetworks.simply-crm.dk
SIMPLYCRM_USERNAME=ct
SIMPLYCRM_API_KEY=b00ff2b7c08d591
BACKUP_RESTORE_DRY_RUN=false
