package com.tofly.common.core.constant;

import java.util.HashMap;
import java.util.Map;

/**
 * @author tuonbed
 * @date 2019/11/19  10:17
 * 判断表唯一字段
 */
public class TableFkConstans {
    public final static Map<String ,Map<String, Map>> tables=new HashMap(){{
        //用户表，判断名字唯一
        put("user",new HashMap(){{
            put("tableName","tf_smpn_user_x");
            put("tableColumn","username");
        }});
        //角色表，判断角色名称唯一
        put("role",new HashMap(){{
            put("tableName","tf_smpn_role_x");
            put("tableColumn","role_name");
        }});
        //部门表，判断部门名称唯一
        put("department",new HashMap(){{
            put("tableName","tf_smpn_department_x");
            put("tableColumn","name");
        }});
        //子系统表，判断子系统名称唯一
        put("system",new HashMap(){{
            put("tableName","tf_smpn_system_x");
            put("tableColumn","system_name");
        }});
        //资源字典表，判断资源名称唯一
        put("sourcedic_name",new HashMap(){{
            put("tableName","tf_smpn_sourcedic_x");
            put("tableColumn","name");
        }});
        //资源字典表，判断资源编码唯一
        put("sourcedic_code",new HashMap(){{
            put("tableName","tf_smpn_sourcedic_x");
            put("tableColumn","code");
        }});
        //菜单表，判断菜单名称唯一
        put("menu_name",new HashMap(){{
            put("tableName","tf_smpn_menu_x");
            put("tableColumn","name");
        }});
        //菜单表，判断菜单编码唯一
        put("menu_code",new HashMap(){{
            put("tableName","tf_smpn_menu_x");
            put("tableColumn","code");
        }});
        //资源配置表，判断资源名称唯一
        put("source_name",new HashMap(){{
            put("tableName","tf_smpn_source_x");
            put("tableColumn","name");
        }});
        //资源配置表，判断资源编码唯一
        put("source_code",new HashMap(){{
            put("tableName","tf_smpn_source_x");
            put("tableColumn","ckey");
        }});
    }};

}
