package com.njcn.gather.tool.active.config;

import cn.hutool.system.SystemUtil;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.io.File;

@Data
@ConfigurationProperties(prefix = "activate")
public class ActivateProperties {
    private final String LICENSE_FILE_NAME = "license.key";

    /**
     * RSA公钥
     */
    private String publicKey;
    /**
     * RSA私钥
     */
    private String privateKey;

    /**
     * 密钥文件所在目录，默认为当前项目目录
     */
    private String licenseDir = System.getProperty(SystemUtil.USER_DIR);

    public String getLicenseFilePath() {
        return licenseDir + File.separator + LICENSE_FILE_NAME;
    }


}
