package com.bofeng.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.bofeng.entity.Room;
import com.yvan.PageDb;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface RoomMapper extends BaseMapper<Room> {

    List<Room> selectAll(PageDb pageDb);

    List<Room> selectByPlaceId(@Param("placeId") Long placeId,PageDb pageDb);

    int deleteByPlaceId(@Param("placeId") Long placeId);

    int checkRoomNameCount(Room room);

    int enableRoomById(@Param("roomId") Long roomId);

    int useRoomById(@Param("roomId") Long roomId);

    int reserveRoomById(@Param("roomId") Long roomId);
}
