package com.ycwl.basic.integration.common.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

@Data
@Component
@RefreshScope
@ConfigurationProperties(prefix = "integration")
public class IntegrationProperties {
    
    /**
     * 景区服务配置
     */
    private ScenicConfig scenic = new ScenicConfig();
    
    @Data
    public static class ScenicConfig {
        /**
         * 是否启用景区服务集成
         */
        private boolean enabled = true;
        
        /**
         * 服务名称
         */
        private String serviceName = "zt-scenic";
        
        /**
         * 超时配置（毫秒）
         */
        private int connectTimeout = 5000;
        private int readTimeout = 10000;
        
        /**
         * 重试配置
         */
        private boolean retryEnabled = false;
        private int maxRetries = 3;
    }
}