package cn.ey.biz.module.system.framework.datapermission.config;

import cn.ey.biz.module.system.framework.datapermission.rule.AppDataPermissionRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * system 模块的数据权限 Configuration
 */
@Configuration(proxyBeanMethods = false)
public class DataPermissionConfiguration {

    @Bean
    public AppDataPermissionRule getServiceDataPermissionRule(AppDataPermissionRule rule) {
        rule.setTableName("system_menu", "app_code");
        rule.setTableName("system_role", "app_code");
        rule.setTableName("system_app", "app_code");
        rule.setTableName("infra_i18n_app", "app");
        rule.setTableName("system_category_app", "app");
        rule.setTableName("system_data_role", "app");
        rule.setTableName("system_abac", "app");

        return rule;
    }

}
