package com.zt.plat.module.qms.framework.datapermission.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.zt.plat.framework.datapermission.core.rule.dept.DeptDataPermissionRuleCustomizer;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessAssayTaskDataDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustDetailDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSampleEntrustRegistrationDO;
import com.zt.plat.module.qms.business.bus.dal.dataobject.BusinessSubSampleDO;

@Configuration(proxyBeanMethods = false)
public class DataPermissionConfiguration {

    @Bean
    public DeptDataPermissionRuleCustomizer sysDeptDataPermissionRuleCustomizer() {
        return rule -> {
        	rule.addDeptColumn(BusinessSampleEntrustRegistrationDO.class);
        	rule.addDeptColumn(BusinessSampleEntrustDetailDO.class);
        	rule.addDeptColumn(BusinessSubSampleDO.class);
        	rule.addDeptColumn(BusinessAssayTaskDO.class);
        	rule.addDeptColumn(BusinessAssayTaskDataDO.class);
        };
    }
}
