<?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="cn.reghao.tnb.content.app.chat.db.mapper.FileMessageMapper">
    <insert id="save" useGeneratedKeys="true" keyProperty="id">
        insert into chat_file_message
        (`file_type`,`record_id`,`upload_id`,`channel_id`,`filename`,`width`,`height`)
        values 
        (#{fileType},#{recordId},#{uploadId},#{channelId},#{filename},#{width},#{height})
    </insert>

    <select id="findByRecordId" resultType="cn.reghao.tnb.content.app.chat.model.po.message.FileMessage">
        select *
        from chat_file_message
        where record_id=#{recordId}
    </select>
</mapper>
