package com.lesingle.creation.common.config;

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

/**
 * 阿里云 OSS 配置属性
 *
 * @author lesingle
 * @since 1.0.0
 */
@Data
@Component
@ConfigurationProperties(prefix = "aliyun.oss")
public class OssProperties {

    /**
     * OSS Endpoint
     * 如：oss-cn-hangzhou.aliyuncs.com
     */
    private String endpoint;

    /**
     * Access Key ID
     */
    private String accessKeyId;

    /**
     * Access Key Secret
     */
    private String accessKeySecret;

    /**
     * Bucket 名称
     */
    private String bucketName;

    /**
     * 自定义域名（可选）
     * 如：https://cdn.example.com
     */
    private String customDomain;

    /**
     * 文件上传根目录
     * 如：uploads/
     */
    private String rootDir = "";

}
