package com.yaoai.domain.mapper;

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

import java.util.List;

@Mapper
public interface ShotAssetMapper extends BaseMapper<ShotAsset> {

    @Select("SELECT * FROM shot_assets WHERE storyboard_id=#{storyboardId} AND is_active=1 ORDER BY created_at DESC")
    List<ShotAsset> findActiveByStoryboard(Long storyboardId);
}
