<?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="mybatis-generator.properties" />
	<context id="Mysql" targetRuntime="MyBatis3Simple" defaultModelType="flat">
		<plugin type="tk.mybatis.mapper.generator.MapperPlugin">
			<property name="mappers" value="tk.mybatis.mapper.common.Mapper" />
			<!-- caseSensitive默认false，当数据库表名区分大小写时，可以将该属性设置为true -->
			<property name="caseSensitive" value="true" />
		</plugin>

		<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver" connectionURL="${jdbc.url}" userId="${jdbc.user}" password="${jdbc.password}">
			<property name="nullCatalogMeansCurrent" value="true" />
		</jdbcConnection>

		<!-- targetProject:生成PO类的位置 -->
		<javaModelGenerator targetPackage="com.cool.store.entity" targetProject="coolstore-partner-model/src/main/java" >
			<property name="enableSubPackages" value="true"/>
		</javaModelGenerator>

		<!-- targetProject:mapperXML映射文件生成的位置 -->
		<sqlMapGenerator targetPackage="mapper" targetProject="coolstore-partner-dao/src/main/resources" />

		<!-- targetPackage：mapper接口生成的位置 -->
		<javaClientGenerator targetPackage="com.cool.store.mapper" targetProject="coolstore-partner-dao/src/main/java" type="XMLMAPPER" />

		<table tableName="${table.name}" enableCountByExample="false" enableUpdateByExample="true" enableDeleteByExample="false"
			   enableSelectByExample="true" selectByExampleQueryId="true" domainObjectName="${table.object.class}" mapperName="${table.mapper}" >
			<generatedKey column="id" sqlStatement="Mysql" identity="true" type=""/>
		</table>
	</context>
</generatorConfiguration>