package com.fufan.mtsaas.aliyun;

import com.fufan.mtsaas.aliyun.enums.VerificationCodeGeneratorTypeEnum;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import java.util.List;

@Data
@Validated
@Component
@ConfigurationProperties(prefix = ApplicationProperties.PREFIX)
public class ApplicationProperties {

    public static final String PREFIX = "application";

    @Valid
    private final Sms sms = new Sms();

    @Data
    public static class Sms {

        /**
         * 是否真实发送
         */
        private boolean realSend = true;

        /**
         * 验证码生成类型
         */
//        @NotNull
        private VerificationCodeGeneratorTypeEnum verificationCodeGeneratorType;

        /**
         * 固定验证码手机号集合
         */
        private List<String> fixedVerificationCodePhoneNumbers;

    }

}
