package com.sckw.excel.translate.properties;

import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.validation.annotation.Validated;


/**
 *
 * 翻译的参数配置
 *
 *
 * @author lfdc
 * @version v1
 * @create 2020-11-30 17:22:34
 * @copyright
 */
@Order(9)
@Configuration
@Getter
@Setter
@Validated
@RefreshScope
public class TranslateProperties {

    /**
     * 数据源的缓存时间 单位为分钟
     */
    @Value("${translate.cache:60}")
    private long expireTime;

    @Value("${translate.organizationUrl}")
    @NotBlank(message = "translate.organizationUrl can't be null")
    private String organizationUrl;
}