server:
  zkpush:
    timezone: 2
    port: 8081
    enable_tls: true

logging:
  caller: 0
  outputs: ["console", "file"]
  file:
    enabled: true
    path: "./eHPush.log"
    max_backups: 30
  level: "error" 

integration:
  enabled: true
  type: "ehpush_v1" # This MUST match the name registered in eHPush/pkg/integration/provider.go
  mode: "onPremise"  # General mode hint for the framework, eHPush provider also reads its own mode from custom.

  # Schedule hints for the framework (can be used by providers)
  schedule:
    users: "1 * * * * *"       # Example: Daily at 1 AM for user sync
    workcodes: "0 2 * * * *"   # Example: Daily at 2 AM for workcode sync
    access_groups: "0 3 * * * *" # Example: Daily at 3 AM for access group sync
    buffer_processing: "*/1 * * * * *" # Example: Every minute for log buffer (if provider uses it)

  # Custom provider-specific configuration for eHPush_v1
  # These settings are parsed into eHPush/pkg/integration/config.go:ProviderConfig
  custom:
    mode: "local" # REQUIRED: "local" or "cloud"
    default_tenant_id: "local"
    # --- Enhora Database Connection Details ---
    db_host: "127.0.0.1"
    db_port: 3306
    db_user: "enhoraweb"
    db_pass: "7cW86c3SXeENKNR4"
    db_name_template: "enhoraweb"

    db_connect_timeout: "10s" # e.g., "5s", "1m"
    db_max_open_conns: 20
    db_max_idle_conns: 10
    db_conn_max_lifetime: "1h"

    # --- Enhora Log Push API Details (for pushing attendance logs to Enhora's /events endpoint) ---
    log_push_url_template: "http://127.0.0.1/services.php/events" # Example
    log_push_method: "POST" 
    log_push_timeout: "15s"
    log_push_batch_size: 100 # How many logs to send in one HTTP request to Enhora
    log_push_retry_count: 2
    log_push_retry_delay: "10s"

    stamp_table_name: "configuration"
