package com.hz.pm.api.common.config;

import cn.hutool.core.util.RandomUtil;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * <p>
 * AuthCodeProps
 * </p>
 *
 * @author WendyYang
 * @since 00:15 2023/12/21
 */
@Data
@ConfigurationProperties(prefix = "auth-code")
public class AuthCodeProps {

    private String secretKey;

    /**
     * authCode失效时间（单位：秒）
     */
    private Integer expireTime = 10;

    /**
     * authCode长度（最大：24~32）
     */
    private Integer length = 24;

    public static void main(String[] args) {
        System.out.println("secretKey:" + RandomUtil.randomString(24));
    }

}
