spring:
  application:
    name: wtm-api

  datasource:
    url: jdbc:mysql://${DB_HOST:ws.ubuilder.co.kr}:${DB_PORT:3306}/${DB_NAME:mos}?useUnicode=true&characterEncoding=UTF-8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Seoul
    username: ${DB_USER:jsh}
    password: ${DB_PASS:jsh@}
    driver-class-name: com.mysql.cj.jdbc.Driver

  jpa:
    hibernate:
      ddl-auto: update      # 개발 단계: Flyway + Hibernate 보완
    open-in-view: false

  flyway:
    enabled: true
    locations: classpath:db/migration/mysql
    baseline-on-migrate: true
    baseline-version: 0

  data:
    redis:
      host: ${REDIS_HOST:localhost}
      port: 6379

server:
  port: ${SERVER_PORT:8081}

wbx:
  spring:
    api-prefix: /api/wtm
    jwt:
      secret: ${JWT_SECRET:dev-secret-key-minimum-256-bits-long-for-wtm-project}
      expiration: 28800
    admin-ui:
      enabled: true
    cors:
      allowed-origins: ${CORS_ORIGINS:http://localhost:5173,http://localhost:5174}
    notification:
      sse-enabled: true

wtm:
  work-rules:
    default-min-daily-hours: 8
    default-max-weekly-hours: 52

management:
  endpoints:
    web:
      exposure:
        include: health,info,metrics
  endpoint:
    health:
      show-details: when-authorized

springdoc:
  api-docs:
    path: /api-docs
  swagger-ui:
    path: /swagger-ui
  packages-to-scan: kr.co.accura.wtm,kr.co.accura.wbx.spring
