package com.iformall.config;

import com.iformall.plugin.MultiTenancy;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Properties;

@Configuration
public class MyBatisConfiguration {

    @Bean
    public MultiTenancy multiTenancy() {
        MultiTenancy multiTenancy = new MultiTenancy();
        Properties properties = new Properties();
        properties.setProperty("tenantIdColumn", "tenant_id");
        properties.setProperty("dialect", "mysql");
        properties.setProperty("tenantInfo", "com.iformall.tenant.TenantInfoImpl");
        multiTenancy.setProperties(properties);
        return multiTenancy;
    }
}
