package gc.mda.signal_batch.global.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

@Configuration
@Profile({"prod", "prod-mpr", "dev", "local"})
@ConfigurationProperties(prefix = "spring.datasource")
@Data
public class DataSourceConfigProperties {
    private DatabaseProperties collect = new DatabaseProperties();
    private DatabaseProperties query = new DatabaseProperties();
    private DatabaseProperties batch = new DatabaseProperties();

    @Data
    public static class DatabaseProperties {
        private String jdbcUrl;
        private String username;
        private String password;
        private String driverClassName = "org.postgresql.Driver";
    }
}