<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.system.mapper.CodeMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="codeResultMap" type="org.springblade.system.entity.Code">
        <id column="id" property="id"/>
        <result column="code_name" property="codeName"/>
        <result column="table_name" property="tableName"/>
        <result column="pk_name" property="pkName"/>
        <result column="model_name" property="modelName"/>
        <result column="package_name" property="packageName"/>
        <result column="api_path" property="apiPath"/>
        <result column="web_path" property="webPath"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="baseColumnList">
        select
        id, code_name, table_name, pk_name, model_name, package_name, api_path, web_path, is_deleted
    </sql>

    <select id="selectCodePage" resultMap="codeResultMap">
        select * from blade_code where is_deleted = 0
    </select>

</mapper>
