package com.prolog.rdc.tms.constant;

import org.springframework.amqp.core.Queue;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RabbitMQSetting {

    @Bean
    @ConditionalOnMissingBean(name = { RabbitMQConstant.EXPENSE_ACCOUNT_IMPORT })
    public Queue expenseAccount(){
        return new Queue(RabbitMQConstant.EXPENSE_ACCOUNT_IMPORT);
    }

    @Bean
    @ConditionalOnMissingBean(name = { RabbitMQConstant.EXPENSE_MANAGEMENT_IMPORT })
    public Queue expenseManagement(){
        return new Queue(RabbitMQConstant.EXPENSE_MANAGEMENT_IMPORT);
    }

    @Bean
    @ConditionalOnMissingBean(name = { RabbitMQConstant.SUPPLIER_SHIPPER_IMPORT_LOG })
    public Queue supplierImport(){
        return new Queue(RabbitMQConstant.SUPPLIER_SHIPPER_IMPORT_LOG);
    }


    @Bean
    @ConditionalOnMissingBean(name = { RabbitMQConstant.SUPPLIER_IMPORT_LOG })
    public Queue supplierImportLog(){
        return new Queue(RabbitMQConstant.SUPPLIER_IMPORT_LOG);
    }
    
    @Bean
    @ConditionalOnMissingBean(name = { RabbitMQConstant.ITEM_CATEGORY_IMPORT_LOG })
    public Queue categoryLog(){
        return new Queue(RabbitMQConstant.ITEM_CATEGORY_IMPORT_LOG);
    }
    
    @Bean
    @ConditionalOnMissingBean(name = { RabbitMQConstant.ITEM_IMPORT_LOG })
    public Queue itemImportLog(){
        return new Queue(RabbitMQConstant.ITEM_IMPORT_LOG);
    }
    
    @Bean
    @ConditionalOnMissingBean(name = { RabbitMQConstant.CUSTOMER_IMPORT_LOG })
    public Queue customerImportLog(){
        return new Queue(RabbitMQConstant.CUSTOMER_IMPORT_LOG);
    }

    @Bean
    @ConditionalOnMissingBean(name = { RabbitMQConstant.CUSTOMER_RECEIVER_IMPORT_LOG })
    public Queue customerReceiverLog(){
        return new Queue(RabbitMQConstant.CUSTOMER_RECEIVER_IMPORT_LOG);
    }

    @Bean
    @ConditionalOnMissingBean(name = { RabbitMQConstant.BRANCH_IMPORT_LOG})
    public Queue branchImportLog(){
        return new Queue(RabbitMQConstant.BRANCH_IMPORT_LOG);
    }

    @Bean
    @ConditionalOnMissingBean(name = { RabbitMQConstant.BRANCH_CARPORT_IMPORT_LOG })
    public Queue branchImport(){
        return new Queue(RabbitMQConstant.BRANCH_CARPORT_IMPORT_LOG);
    }

    @Bean
    @ConditionalOnMissingBean(name = { RabbitMQConstant.SETTLEMENT_FEE_IMPORT })
    public Queue settlementFeeImport(){
        return new Queue(RabbitMQConstant.SETTLEMENT_FEE_IMPORT);
    }

}