package jnpf.personnels.utils;

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

import javax.annotation.PostConstruct;
import java.util.List;
import java.util.Map;

/**
 * 短信配置
 *
 * @author yanwenfu
 * @create 2025-05-20
 */
@Component
@RefreshScope
@ConfigurationProperties(prefix = "config.sms-config")
@Getter
@Setter
@ToString
public class SmsConfig {

    private Map<String, TenantConfig> tenants;

    @Getter
    @Setter
    @ToString
    public static class TenantConfig {
        private String smsSecretId;
        private String smsSecretKey;
        private String smsSdkAppId;
        private String smsSdkAppKey;
        private String smsEndpoint;
        private String smsRegion;
        private List<SmsTemplate> smsTemplateList;
        private String smsSignContent;
    }
}
