package com.spring.common.properties;

import java.util.Map;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.ConstructorBinding;
import org.springframework.boot.context.properties.bind.DefaultValue;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

@Getter
@ConstructorBinding
@ConfigurationProperties(prefix = "path")
@RequiredArgsConstructor
public class PathProperties {
    
    private final Map<String, PathConfig> paths;

    @Getter
    public static class PathConfig {
        private final String upload;
        private final String dowonload;

        public PathConfig(
            @DefaultValue("") String upload,
            @DefaultValue("") String dowonload
        ) {
            this.upload = upload;
            this.dowonload = dowonload;
        }
    }

}
