package com.dora.mapper;

import com.dora.entity.VideoCollection;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 视频合集 Mapper
 */
@Mapper
public interface VideoCollectionMapper {

    /**
     * 根据ID查询合集
     */
    VideoCollection selectById(@Param("id") Long id);

    /**
     * 根据创建者ID获取合集列表
     */
    List<VideoCollection> selectByOwnerId(@Param("ownerId") Long ownerId);

    /**
     * 插入合集
     */
    int insert(VideoCollection collection);

    /**
     * 更新合集
     */
    int updateById(VideoCollection collection);

    /**
     * 提交合集审核：更新名称/描述，并置为待审核
     */
    int submitForAudit(@Param("id") Long id,
                       @Param("ownerId") Long ownerId,
                       @Param("name") String name,
                       @Param("description") String description);
}
