package com.njyunzhi.pet_identity.config;

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

@Data
@Component
@ConfigurationProperties(prefix = "weixin")
public class WeixinConfig {

    @NestedConfigurationProperty
    private Miniapp miniapp = new Miniapp();

    @NestedConfigurationProperty
    private Pay pay = new Pay();

    @Data
    public static class Miniapp {
        private String appid;
        private String secret;
        private String token;
        private String aesKey;
        private String msgDataFormat;
    }

    @Data
    public static class Pay {
        private String appId;
        private String mchId;
        private String mchKey;
        private String subAppId;
        private String subMchId;
        private String apiV3Key;
        private String keyPath;
        private String privateKeyPath;
        private String privateCertPath;
    }
}
