package com.schisandra.oss.application.oss.core.minio.model;


import com.schisandra.oss.application.oss.model.SliceConfig;
import com.schisandra.oss.application.oss.utils.OssPathUtil;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.context.annotation.ScopedProxyMode;

import java.io.Serializable;

/**
 * @author landaiqing
 * @version MinioOssConfig.java, v 1.1 2022/2/20 8:58 chenmin Exp $
 * Created on 2022/2/20
 */
@Data
public class MinioOssConfig implements Serializable {
    private String basePath;
    private String endpoint;
    private String accessKey;
    private String secretKey;
    private String bucketName;

    private MinioOssClientConfig clientConfig = new MinioOssClientConfig();

    /**
     * 断点续传参数
     */
    private SliceConfig sliceConfig = new SliceConfig();

    public void init() {
        this.sliceConfig.init();
        basePath = OssPathUtil.valid(basePath);
    }
}
