spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://192.168.1.250:3306/lesingle-creation-test?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
    username: lesingle-creation-test
    password: 8ErFZiPBGbyrTHsy
    type: com.alibaba.druid.pool.DruidDataSource
    druid:
      initial-size: 5
      min-idle: 5
      max-active: 20
      max-wait: 60000

  data:
    redis:
      host: ${REDIS_HOST:192.168.1.250}
      port: ${REDIS_PORT:6379}
      password: ${REDIS_PASSWORD:QWErty123}
      database: ${REDIS_DB:8}
      timeout: 5000ms
      lettuce:
        pool:
          max-active: 20
          max-idle: 20
          min-idle: 5
          max-wait: -1ms

  flyway:
    clean-disabled: false

# 开发环境开启 SQL 日志
mybatis-plus:
  configuration:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl

# 阿里云 OSS 配置（开发环境）
aliyun:
  oss:
    endpoint: ${OSS_ENDPOINT:oss-cn-shenzhen.aliyuncs.com}
    access-key-id: ${OSS_ACCESS_KEY_ID:LTAI5tKZhPofbThbSzDSiWoK}
    access-key-secret: ${OSS_ACCESS_KEY_SECRET:FtcsC7oQX3T0NaChaa9FYq2aoysQFM}
    bucket-name: ${OSS_BUCKET_NAME:lesingle-creation}
    max-file-size: ${OSS_MAX_FILE_SIZE:10485760}
    # 前端直传跨域：启动时自动配置 OSS CORS
    cors-enabled: ${OSS_CORS_ENABLED:true}
    cors-allowed-origins: ${OSS_CORS_ORIGINS:*}
  # 短信服务配置（测试环境）
  sms:
    access-key-id: ${SMS_ACCESS_KEY_ID:LTAI5tKZhPofbThbSzDSiWoK}
    access-key-secret: ${SMS_ACCESS_KEY_SECRET:FtcsC7oQX3T0NaChaa9FYq2aoysQFM}
    sign-name: ${SMS_SIGN_NAME:乐读派}
    template-code: ${SMS_TEMPLATE_CODE:SMS_490225426}
    enabled: true

# JWT 配置覆盖（测试环境）
jwt:
  secret: ${JWT_SECRET:lesingle-creation-test-jwt-secret-key-2024-secure}

logging:
  level:
    com.lesingle: debug

# 乐读派 AI 创作系统配置
leai:
  org-id: ${LEAI_ORG_ID:gdlib}
  app-secret: ${LEAI_APP_SECRET:leai_mnoi9q1a_mtcawrn8y}
  api-url: ${LEAI_API_URL:http://192.168.1.250:8267}
  reconcile-interval: 60000        # B3对账间隔：1分钟（测试环境）
  reconcile-initial-delay: 30000   # 初始延迟：30秒
