提交 | 用户 | 时间
|
97edd7
|
1 |
package com.iailab.module.shasteel.framework.sms.config; |
H |
2 |
|
|
3 |
import lombok.Data; |
|
4 |
import org.springframework.boot.context.properties.ConfigurationProperties; |
|
5 |
import org.springframework.validation.annotation.Validated; |
|
6 |
|
|
7 |
import javax.validation.constraints.NotNull; |
|
8 |
import java.time.Duration; |
|
9 |
|
|
10 |
@ConfigurationProperties(prefix = "iailab.sms-code") |
|
11 |
@Validated |
|
12 |
@Data |
|
13 |
public class SmsCodeProperties { |
|
14 |
|
|
15 |
/** |
|
16 |
* 过期时间 |
|
17 |
*/ |
|
18 |
@NotNull(message = "过期时间不能为空") |
|
19 |
private Duration expireTimes; |
|
20 |
/** |
|
21 |
* 短信发送频率 |
|
22 |
*/ |
|
23 |
@NotNull(message = "短信发送频率不能为空") |
|
24 |
private Duration sendFrequency; |
|
25 |
/** |
|
26 |
* 每日发送最大数量 |
|
27 |
*/ |
|
28 |
@NotNull(message = "每日发送最大数量不能为空") |
|
29 |
private Integer sendMaximumQuantityPerDay; |
|
30 |
/** |
|
31 |
* 验证码最小值 |
|
32 |
*/ |
|
33 |
@NotNull(message = "验证码最小值不能为空") |
|
34 |
private Integer beginCode; |
|
35 |
/** |
|
36 |
* 验证码最大值 |
|
37 |
*/ |
|
38 |
@NotNull(message = "验证码最大值不能为空") |
|
39 |
private Integer endCode; |
|
40 |
|
|
41 |
} |