<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
        PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
        "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<!--根节点 -->
<generatorConfiguration>
    <!-- 指定外部的属性元素 -->
    <properties resource="application.yml"/>
    <!-- 必须 指定生成一组对象的环境 -->
    <context id="Mysql" targetRuntime="MyBatis3Simple" defaultModelType="flat">
        <!--分隔符 -->
        <property name="autoDelimitKeywords" value="true"/>
        <property name="beginningDelimiter" value="`"/>
        <property name="endingDelimiter" value="`"/>

        <!-- 通用mapper插件 -->
        <plugin type="tk.mybatis.mapper.generator.MapperPlugin">
            <!-- 此处的 MybatisMapper注意一定不能被扫描到-->
            <property name="mappers" value="com.pengzu.utils.MybatisMapper"/>
        </plugin>
        <!-- 注释 规则-->
        <commentGenerator>
            <property name="suppressAllComments" value="false"/>
            <property name="suppressDate" value="true"/>
        </commentGenerator>


        <jdbcConnection driverClass="com.mysql.jdbc.Driver"
                        connectionURL="jdbc:mysql://localhost:3306/pengzucms"
                        userId="root"
                        password="123456">
        </jdbcConnection>

        <javaModelGenerator targetPackage="com.pengzu.entity" targetProject="src/main/java"/>
        <sqlMapGenerator targetPackage="mybatis/mapper" targetProject="src/main/resources"/>
        <javaClientGenerator targetPackage="com.pengzu.dao" targetProject="src/main/java"
                             type="XMLMAPPER"/>
        <table tableName="sys_role" enableCountByExample="true"
               enableUpdateByExample="true" enableDeleteByExample="true"
               enableSelectByExample="true" selectByExampleQueryId="true"
               mapperName="SysRoleDao">
        </table>
        <table tableName="sys_permission" enableCountByExample="true"
               enableUpdateByExample="true" enableDeleteByExample="true"
               enableSelectByExample="true" selectByExampleQueryId="true"
               mapperName="SysPermissionDao">
        </table>
        <table tableName="sys_user" enableCountByExample="true"
               enableUpdateByExample="true" enableDeleteByExample="true"
               enableSelectByExample="true" selectByExampleQueryId="true"
               mapperName="SysUserDao">
        </table>
        <table tableName="sys_user_role" enableCountByExample="true"
               enableUpdateByExample="true" enableDeleteByExample="true"
               enableSelectByExample="true" selectByExampleQueryId="true"
               mapperName="SysUserRoleDao">
        </table>
        <table tableName="sys_role_permission" enableCountByExample="true"
               enableUpdateByExample="true" enableDeleteByExample="true"
               enableSelectByExample="true" selectByExampleQueryId="true"
               mapperName="SysRolePermissionDao">
        </table>
        <table tableName="article" enableCountByExample="true"
               enableUpdateByExample="true" enableDeleteByExample="true"
               enableSelectByExample="true" selectByExampleQueryId="true"
               mapperName="ArticleDao">
        </table>
        <table tableName="brogroll" enableCountByExample="true"
               enableUpdateByExample="true" enableDeleteByExample="true"
               enableSelectByExample="true" selectByExampleQueryId="true"
               mapperName="BrogrollDao">
        </table>
        <table tableName="comment" enableCountByExample="true"
               enableUpdateByExample="true" enableDeleteByExample="true"
               enableSelectByExample="true" selectByExampleQueryId="true"
               mapperName="CommentDao">
        </table>
        <table tableName="config" enableCountByExample="true"
               enableUpdateByExample="true" enableDeleteByExample="true"
               enableSelectByExample="true" selectByExampleQueryId="true"
               mapperName="ConfigDao">
        </table>
        <table tableName="folder" enableCountByExample="true"
               enableUpdateByExample="true" enableDeleteByExample="true"
               enableSelectByExample="true" selectByExampleQueryId="true"
               mapperName="FolderDao">
        </table>
        <table tableName="folder" enableCountByExample="true"
               enableUpdateByExample="true" enableDeleteByExample="true"
               enableSelectByExample="true" selectByExampleQueryId="true"
               mapperName="FolderDao">
        </table>
        <table tableName="download_file" enableCountByExample="true"
               enableUpdateByExample="true" enableDeleteByExample="true"
               enableSelectByExample="true" selectByExampleQueryId="true"
               mapperName="DownloadFileDao">
        </table>
        <table tableName="headline" enableCountByExample="true"
               enableUpdateByExample="true" enableDeleteByExample="true"
               enableSelectByExample="true" selectByExampleQueryId="true"
               mapperName="HeadlineDao">
        </table>
        <table tableName="information" enableCountByExample="true"
               enableUpdateByExample="true" enableDeleteByExample="true"
               enableSelectByExample="true" selectByExampleQueryId="true"
               mapperName="InformationDao">
        </table>
        <table tableName="pengzu_region" enableCountByExample="true"
               enableUpdateByExample="true" enableDeleteByExample="true"
               enableSelectByExample="true" selectByExampleQueryId="true"
               mapperName="RegionDao">
        </table>
    </context>
</generatorConfiguration>