<?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.zhentao.mapper.CaseTimelineMapper">
    
    <!-- 根据案例ID查询时间线列表 -->
    <select id="selectByCaseId" resultType="com.zhentao.entity.CaseTimeline">
        SELECT 
            timeline_id,
            case_id,
            timeline_date,
            timeline_title,
            timeline_desc,
            sort_order
        FROM case_timeline
        WHERE case_id = #{caseId}
        ORDER BY sort_order ASC, timeline_date ASC
    </select>
    
</mapper>


