package com.huiju.estateagents.config;


import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

@Data
@ConfigurationProperties(prefix = "ali")
public class AliOSSProperties {
    public static String accessKeyId;
    public static String accessKeySecret;
    public static OSS oss = new AliOSSProperties.OSS();

    public String getAccessKeyId() { return AliOSSProperties.accessKeyId; }
    public String getAccessKeySecret() { return AliOSSProperties.accessKeySecret; }
    public OSS getOss() { return AliOSSProperties.oss; }

    // setters
    public void setAccessKeyId(String accessKeyId) {
        AliOSSProperties.accessKeyId = accessKeyId;
    }
    public void setAccessKeySecret(String accessKeySecret) { AliOSSProperties.accessKeySecret = accessKeySecret;}

    public static void setOss(OSS oss) {
        AliOSSProperties.oss = oss;
    }

    @Data
    public static class OSS {
        String endpoint;
        String bucketName;
        String bucketURL;
    }
}
