<?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="com.usky.iot.mapper.DmpProductAttributeMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.usky.iot.domain.DmpProductAttribute">
        <id column="id" property="id" />
        <result column="product_id" property="productId" />
        <result column="attribute_name" property="attributeName" />
        <result column="attribute_code" property="attributeCode" />
        <result column="attribute_port" property="attributePort" />
        <result column="attribute_type" property="attributeType" />
        <result column="data_type" property="dataType" />
        <result column="bind_status" property="bindStatus" />
        <result column="attribute_length" property="attributeLength" />
        <result column="attribute_unit" property="attributeUnit" />
        <result column="maximum" property="maximum" />
        <result column="minimum" property="minimum" />
        <result column="time_format" property="timeFormat" />
        <result column="bool_false" property="boolFalse" />
        <result column="bool_true" property="boolTrue" />
        <result column="delete_flag" property="deleteFlag" />
        <result column="attribute_describe" property="attributeDescribe" />
        <result column="created_by" property="createdBy" />
        <result column="created_time" property="createdTime" />
        <result column="updated_by" property="updatedBy" />
        <result column="updated_time" property="updatedTime" />
        <result column="tenant_id" property="tenantId" />
    </resultMap>

    <select id="getSuperTableName" resultType="String">
        SELECT product_code
        FROM dmp_product
        where id = #{productId}
    </select>


</mapper>
