package com.tasteby.mapper;

import com.tasteby.domain.Channel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ChannelMapper {

    List<Channel> findAllActive();

    void insert(@Param("id") String id,
                @Param("channelId") String channelId,
                @Param("channelName") String channelName,
                @Param("titleFilter") String titleFilter);

    int deactivateByChannelId(@Param("channelId") String channelId);

    int deactivateById(@Param("id") String id);

    Channel findByChannelId(@Param("channelId") String channelId);

    void updateChannel(@Param("id") String id,
                       @Param("description") String description,
                       @Param("tags") String tags,
                       @Param("sortOrder") Integer sortOrder);
}
