package com.xzzn.ems.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "weather.api")
public class WeatherApiProperties {

    /**
     * 是否启用天气同步
     */
    private boolean enabled = false;

    /**
     * 天气接口基础地址
     */
    private String baseUrl = "https://archive-api.open-meteo.com/v1/archive";

    /**
     * 可选接口鉴权字段
     */
    private String apiKey;

    /**
     * 时区参数
     */
    private String timezone = "Asia/Shanghai";

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public String getBaseUrl() {
        return baseUrl;
    }

    public void setBaseUrl(String baseUrl) {
        this.baseUrl = baseUrl;
    }

    public String getApiKey() {
        return apiKey;
    }

    public void setApiKey(String apiKey) {
        this.apiKey = apiKey;
    }

    public String getTimezone() {
        return timezone;
    }

    public void setTimezone(String timezone) {
        this.timezone = timezone;
    }
}
