Name: platform
Host: 0.0.0.0
Port: 8888
# go-zero 全局请求超时（毫秒）。dbsync push 冷开 SQLite 常 >3s，默认 3000 会直接 503。
Timeout: 180000

DataSource: "postgres://platform:platform@127.0.0.1:5432/platform?sslmode=disable"
DryRun: false
DevAuth: false
PublicBaseURL: "http://127.0.0.1:8180"
RateLimitPerMin: 6000

Auth:
  AccessSecret: "dev-only-change-me"
  AccessExpire: 86400   # 登录 JWT 有效期（秒），默认 24h；过期需重新登录
  IssueSecret: "dev-only-change-me"
  # 强制仅手机号登录。有 License 期限控制时运行时会自动忽略，允许用户名登录。
  PhoneLoginOnly: false
  RequirePhoneBound: false

SMS:
  # 须加引号：YAML 1.1 会把裸 off/on 当成布尔，导致 type mismatch for field sms.provider
  Provider: "off"
  CodeTTLSeconds: 300   # 短信验证码有效期（秒）
  ResendSeconds: 60
  # DevFixedCode: "123456"
  # 试运行未接短信平台：false；正式接入后改为 true，且 Provider 勿用 "off"
  RequireForBind: false

# 外公司部署：每次续费/延期生成独立签名文件（目录非固定单文件）
License:
  Enabled: false
  Customer: ""
  LeaseDir: "./data/license/leases"
  StateDir: "./data/license/state"   # 消费账本（与 leases 分离）
  ControlSecret: "dev-license-control-secret"
  # RedeemURL: "https://license.yuxinda.example"  # 可选：联网核销，防删库后复用旧包
  SeedNotAfter: ""
  GraceDays: 0
  Message: "授权已过期，请联系宇信达续费"

Agent:
  CapsuleSecret: "dev-agent-capsule-secret"
  RegisterSecret: "dev-only-change-me"
  # 仅宇恒：HMAC 凭票免登录（生产务必换 Secret，并与宇恒后端共享）
  YuhengTicket:
    Enabled: true
    Secret: "dev-yuheng-ticket-secret-change-me"
    Issuer: yuheng
    Audience: aijianzhan
    MaxAgeSec: 120

Storage:
  Driver: local
  LocalRoot: ./data/uploads

DBSync:
  Enabled: true
  DataDir: ./data/dbsync
  LwwAuditTTLDays: 90
  ReconcileMinSec: 300
  # Z12：生产填公司默认 Postgres DSN；空则用 sqlite 联调文件
  DefaultRemoteDriver: postgres
  DefaultRemoteDSN: ""
