<?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.modules.shopping.mapper.AttributesMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="attributesResultMap" type="org.springblade.modules.shopping.entity.Attributes">
        <id column="attr_id" property="attrId"/>
        <result column="category_id" property="categoryId"/>
        <result column="category_name" property="categoryName"/>
        <result column="field_name" property="fieldName"/>
        <result column="title" property="title"/>
        <result column="description" property="description"/>
        <result column="required" property="required"/>
        <result column="formtype" property="formtype"/>
        <result column="choices" property="choices"/>
        <result column="sort" property="sort"/>
        <result column="unit" property="unit"/>
        <result column="min" property="min"/>
        <result column="max" property="max"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>


    <select id="selectAttributesPage" resultMap="attributesResultMap">
        select * from t_attributes where is_deleted = 0
    </select>

</mapper>
