package com.cy.guoyan.admin.module.system.framework.datapermission.config;


import com.cy.guoyan.admin.module.guoyan.dal.dataobject.researchtopiccategory.ResearchTopicCategoryDO;
import com.cy.guoyan.admin.module.guoyan.dal.dataobject.researchtopicinfo.ResearchTopicInfoDO;
import com.cy.guoyan.admin.module.system.dal.dataobject.user.AdminUserDO;
import com.cy.guoyan.admin.framework.datapermission.core.rule.dept.DeptDataPermissionRuleCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

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

    @Bean
    public DeptDataPermissionRuleCustomizer sysDeptDataPermissionRuleCustomizer() {
        return rule -> {
            // user
            rule.addUserColumn(AdminUserDO.class, "id");
//            rule.addUserColumn(ResearchTopicInfoDO.class, "creator");
//            rule.addUserColumn(ResearchTopicCategoryDO.class, "creator");
        };
    }

}
