server:
  port: 19089
  servlet:
    context-path: /api

spring:
  application:
    name: emotion-single

  profiles:
    active: ${SPRING_PROFILES_ACTIVE:local}

  # Jackson配置 - 所有环境统一
  jackson:
    date-format: yyyy-MM-dd HH:mm:ss
    time-zone: GMT+8
    serialization:
      write-dates-as-timestamps: false
    default-property-inclusion: non_null

# MyBatis Plus配置 - 所有环境统一
mybatis-plus:
  configuration:
    map-underscore-to-camel-case: true
    cache-enabled: false
    call-setters-on-nulls: true
    jdbc-type-for-null: "null"
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  global-config:
    db-config:
      id-type: assign_id
      logic-delete-field: isDeleted
      logic-delete-value: 1
      logic-not-delete-value: 0
    banner: false
  mapper-locations: classpath*:mapper/*.xml

# 日志配置 - 所有环境统一
logging:
  level:
    com.emotion: info
    org.springframework.security: warn
    root: info
  pattern:
    console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{50} - %msg%n"
    file: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{50} - %msg%n"
  file:
    name: logs/emotion-single.log
    max-size: 100MB
    max-history: 30

# 管理端点配置 - 所有环境统一
management:
  endpoints:
    web:
      exposure:
        include: health,info,metrics
  endpoint:
    health:
      show-details: always

# 应用配置 - 所有环境统一
emotion:
  # JWT配置
  jwt:
    secret: EmotionMuseumJWTSecretKey2025ForAuthenticationAndAuthorizationSecureEnoughForHS512Algorithm
    expiration: 86400000 # 24小时
    header: Authorization
    prefix: "Bearer "

  # Coze API配置 - 所有环境统一
  coze:
    api:
      token: sat_WgqusMh5gTfgRhsEFycGA5n9NailrJYV1rHeruJCHNB1gAvJz4laprLsvK8i2jEL
      base-url: https://api.coze.cn
      # 对话聊天
      chat:
        path: /v3/chat
        talk:
          bot-id: 7523042446285439016
          workflow-id: 7523047462895796287
        # 聊天记录总结
        summary:
          bot-id: 7529062814150295595
          workflow-id: 7523047462895796287
      timeout: 30000
      retry-count: 3
      retry-delay: 1000

  # 文件上传配置
  upload:
    path: /data/uploads/emotion-museum
    max-file-size: 10MB
    allowed-types: jpg,jpeg,png,gif,pdf,doc,docx

  # 安全配置
  security:
    ignore-urls:
      - /api/auth/login
      - /api/auth/register
      - /api/health
      - /api/health/info
      - /api/actuator/**
      - /api/websocket/**
      - /api/ai/guest/**

async:
  core-pool-size: 10
  max-pool-size: 50
  queue-capacity: 200
  keep-alive-seconds: 60
  thread-name-prefix: single-async-
