package com.yaoai.domain.mapper;

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

import java.util.List;

@Mapper
public interface CharacterMapper extends BaseMapper<Character> {

    @Select("SELECT * FROM characters WHERE project_id=#{projectId} AND tenant_id=#{tenantId} ORDER BY created_at ASC")
    List<Character> findByProject(Long projectId, Long tenantId);
}
