package com.fs.live.service;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fs.live.domain.LiveWatchUser;

/**
 * 直播间观看用户Service接口
 * 
 * @author fs
 * @date 2025-01-18
 */
public interface ILiveWatchUserService extends IService<LiveWatchUser>{
    /**
     * 查询直播间观看用户
     * 
     * @param id 直播间观看用户主键
     * @return 直播间观看用户
     */
    LiveWatchUser selectLiveWatchUserById(Long id);

    /**
     * 查询直播间观看用户列表
     * 
     * @param liveWatchUser 直播间观看用户
     * @return 直播间观看用户集合
     */
    List<LiveWatchUser> selectLiveWatchUserList(LiveWatchUser liveWatchUser);

    /**
     * 新增直播间观看用户
     * 
     * @param liveWatchUser 直播间观看用户
     * @return 结果
     */
    int insertLiveWatchUser(LiveWatchUser liveWatchUser);

    /**
     * 修改直播间观看用户
     * 
     * @param liveWatchUser 直播间观看用户
     * @return 结果
     */
    int updateLiveWatchUser(LiveWatchUser liveWatchUser);

    /**
     * 批量删除直播间观看用户
     * 
     * @param ids 需要删除的直播间观看用户主键集合
     * @return 结果
     */
    int deleteLiveWatchUserByIds(Long[] ids);

    /**
     * 删除直播间观看用户信息
     * 
     * @param id 直播间观看用户主键
     * @return 结果
     */
    int deleteLiveWatchUserById(Long id);

    LiveWatchUser getByLiveIdAndUserId(long liveId, long userId);

    void join(long liveId, long userId);
    void close(long liveId, long userId);
}
