<?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.srm.bpm.infra.dao.FormValidationDao">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.srm.bpm.infra.entity.FormValidationEntity">
        <result column="id" property="id"/>
        <result column="version" property="version"/>
        <result column="creation_time" property="creationTime"/>
        <result column="update_time" property="updateTime"/>
        <result column="is_deleted" property="isDeleted"/>
        <result column="form_id" property="formId"/>
        <result column="expression" property="expression"/>
    </resultMap>
    <select id="selectByProcessId"
            resultType="com.srm.bpm.infra.entity.FormValidationEntity">
        select fv.*
        from form_validation fv INNER JOIN toa_form tf
        ON tf.id = fv.form_id
        WHERE tf.process_id = #{processId}
    </select>

</mapper>
