server:
  port: 8087
spring:
  application:
    name: ai-service
  datasource:
    type: com.alibaba.druid.pool.DruidDataSource
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://${DB_HOST:111.229.80.149}:${DB_PORT:3306}/${DB_NAME:erp_db}?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
    username: ${DB_USER:root}
    password: ${DB_PASSWORD:nihao588+}
    druid:
      initial-size: 5
      min-idle: 5
      max-active: 20
      max-wait: 60000
  data:
    redis:
      host: ${REDIS_HOST:111.229.80.149}
      port: ${REDIS_PORT:6379}
      password: ${REDIS_PASSWORD:Y(@r5tGk9$Lp2}
      database: 0
      timeout: 5000
      lettuce:
        pool:
          max-active: 8
          max-idle: 8
          min-idle: 0
          max-wait: -1ms
  cloud:
    nacos:
      discovery:
        server-addr: ${NACOS_HOST:111.229.80.149}:8848
        namespace: ${NACOS_NAMESPACE:public}
      config:
        server-addr: ${NACOS_HOST:111.229.80.149}:8848
        namespace: ${NACOS_NAMESPACE:public}
        file-extension: yml
  zipkin:
    base-url: ${ZIPKIN_SERVER_URL:http://localhost:9411}
    sender:
      type: web
  sleuth:
    sampler:
      probability: 1.0
      rate: 100
    trace-id128: true
mybatis-plus:
  configuration:
    map-underscore-to-camel-case: true
    log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
  global-config:
    db-config:
      id-type: auto
      logic-delete-field: deleted
      logic-delete-value: 1
      logic-not-delete-value: 0
  mapper-locations: classpath*:/mapper/**/*.xml
ai:
  system-prompt:
    base: 你是一个专业的ERP系统AI助手，专门帮助用户处理企业资源管理相关的问题。
    modules:
      goods: 你现在正在处理商品管理模块的问题。
      orders: 你现在正在处理订单管理模块的问题。
      purchase: 你现在正在处理采购管理模块的问题。
      inventory: 你现在正在处理库存管理模块的问题。
      finance: 你现在正在处理财务管理模块的问题。
management:
  endpoints:
    web:
      exposure:
        include: health,info,metrics,prometheus,caches,beans,env,loggers,threaddump,heapdump,scheduledtasks
        base-path: /actuator
  endpoint:
    health:
      show-details: always
      probes:
        enabled: true
    prometheus:
      enabled: true
    info:
      enabled: true
  metrics:
    tags:
      application: ai-service
    export:
      prometheus:
        enabled: true
  health:
    livenessstate:
      enabled: true
    readinessstate:
      enabled: true
logging:
  level:
    com.erp.ai: DEBUG
    org.springframework.web: INFO
springdoc:
  api-docs:
    enabled: true
    path: /v3/api-docs
  swagger-ui:
    enabled: true
    path: /swagger-ui.html
    tags-sorter: alpha
    operations-sorter: alpha
    display-request-duration: true
knife4j:
  enable: true
  setting:
    language: zh_cn
  openapi:
    info:
      title: ai-service API
      description: API Documentation
      version: 1.0.0
      contact:
        name: ERP Team
        email: dev@erpzbbh.cn

# 公共OpenAPI配置（来自 common-config）
erp:
  openapi:
    title: ai-service API
    description: ai-service 服务API文档
    version: 1.0.0
    service-url: ${ai-service_SERVICE_URL:https://api.erpzbbh.cn}
