package com.yaoai.domain.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yaoai.domain.entity.Outline;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface OutlineMapper extends BaseMapper<Outline> {

    @Select("SELECT * FROM outlines WHERE project_id=#{projectId} AND tenant_id=#{tenantId} ORDER BY created_at DESC LIMIT 1")
    Outline findLatestByProject(Long projectId, Long tenantId);
}
