spring:
  application:
    name: ga-api
  profiles:
    active: trading_ai
  datasource:
    url: jdbc:postgresql://localhost:5432/ga
    username: ga
    password: ga
    driver-class-name: org.postgresql.Driver
  flyway:
    enabled: true
    locations: classpath:db/migration
    baseline-on-migrate: true
  data:
    redis:
      host: localhost
      port: 6379
  servlet:
    multipart:
      max-file-size: 100MB
      max-request-size: 100MB

server:
  port: 8082
  servlet:
    encoding:
      charset: UTF-8
      force: true

mybatis:
  config-location: classpath:mybatis/mybatis-config.xml
  mapper-locations: classpath*:mapper/**/*.xml
  type-aliases-package: com.ga.core.vo,com.ga.common.model

pagehelper:
  helper-dialect: postgresql
  reasonable: true
  support-methods-arguments: true

springdoc:
  swagger-ui:
    path: /swagger-ui.html

ga:
  jwt:
    secret: ${JWT_SECRET:change-me-please-this-must-be-at-least-256-bits-long-secret-key}
    access-token-expire: 7200000
    refresh-token-expire: 604800000
  encrypt:
    key: ${ENCRYPT_KEY:0123456789abcdef0123456789abcdef}

app:
  attachment:
    path: ${ATTACHMENT_PATH:./uploads}
  withdraw:
    approval-line-id: ${WITHDRAW_APPROVAL_LINE_ID:1}
  # 외부연동 어댑터 선택 (ga-external-adapter 모듈의 구현체 분기)
  # bank: mock | kftc — 실제 KFTC SDK 통합 전까지 mock 유지
  # message: mock | toast — 실제 NHN Toast/카카오 통합 전까지 mock 유지
  adapter:
    bank:    ${ADAPTER_BANK:mock}
    message: ${ADAPTER_MESSAGE:mock}
  # 펌뱅킹 재시도 배치
  bank-retry:
    limit: ${BANK_RETRY_LIMIT:50}
    # 미설정 시 사실상 비활성 (매년 1/1 0시). 운영 활성화 예: "0 */10 * * * *"
    cron:  ${BANK_RETRY_CRON:0 0 0 1 1 ?}
  # 펌뱅킹 SETTLED 동기화 배치 — 어댑터 queryStatus 폴링
  bank-settle:
    limit: ${BANK_SETTLE_LIMIT:50}
    # 미설정 시 사실상 비활성. 운영 활성화 예: "0 */5 * * * *"
    cron:  ${BANK_SETTLE_CRON:0 0 0 1 1 ?}

logging:
  level:
    com.ga: DEBUG
    org.mybatis: INFO
