/**
 * 
 */
package org.springblade.core.mp.properties;

import java.util.ArrayList;
import java.util.List;

import lombok.Data;

/**
 * @author wookvn
 *
 */
@Data
public class TenantProperties {
	
	/**
	 * 租户ID列名
	 */
	private String tenantIdColumn = "tenant_id";
	
	/**
	 * 配置文件设置排除的Mapper#method
	 */
	private List<String> exclusionMapperIds = new ArrayList<>();
	
	/**
	 * 配置文件设置排除的表名
	 */
	private final List<String> exclusionTableNames = new ArrayList<>();
	/**
	 * 配置文件设置不排除的表名
	 */
	private final List<String> includeTableNames = new ArrayList<>();
	/**
	 * 忽略所有表
	 */
	private boolean ignoreTable = false;

	/**
	 * 配置文件设置排除表名的前缀
	 */
	private final List<String> exclusionTableNamePrefix = new ArrayList<>();
	
	/**
	 * 默认屏蔽的MapperIds
	 */
	private final List<String> defaultExclusionMapperIds = new ArrayList<>();
	
	public TenantProperties() {
		//添加默认屏蔽的MapperIds
		defaultExclusionMapperIds.add("Mapper.selectById");
		defaultExclusionMapperIds.add("Mapper.selectBatchIds");
		defaultExclusionMapperIds.add("Mapper.deleteById");
		defaultExclusionMapperIds.add("Mapper.deleteBatchIds");
		defaultExclusionMapperIds.add("Mapper.updateById");
	}
}
