package thyyxxk.webserver.config.envionment;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@Data
@ConfigurationProperties(prefix = "thyy.ca")
@NoArgsConstructor
public class CaData {

    @Data
    public static class MobileApp {
        private String signAlgorithms;
        private String privatekey;
        private String appId;
        private String id;
        private String url;
    }

    @Data
    public static class SignAuthentication {
        /**
         * 应用系统标识
         */
        private String appCode;

        /**
         * 应用系统密码
         */
        private String appPwd;

        /**
         * 证书
         */
        private String containerName;

        /**
         * 签名算法
         */
        private String signAig;

        /**
         * 地址
         */
        private String url;
    }

    @Data
    public static class TimestampAuthentication {
        private String url;
        /**
         * 应用系统标识
         */
        private String appCode;

        /**
         * 应用系统密码
         */
        private String appPwd;
    }

    /**
     * 手写数字签名系统接口规范
     */
    private HBoardSign hBoardSign;

    @Data
    public static class HBoardSign {
        private String apiKey;
        private String apiSecret;
        private String url;

        /**
         * 回调的签名
         */
        private String returnUrl;
    }

    private MobileApp mobileApp;
    private SignAuthentication signAuthentication;
    private TimestampAuthentication timestampAuthentication;
}
