package shop.alien.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import shop.alien.entity.store.UserReservationTable;

/**
 * 用户预约与桌号关联表 Mapper 接口
 *
 * @author system
 */
public interface UserReservationTableMapper extends BaseMapper<UserReservationTable> {

    /**
     * 按预约ID物理删除关联（用于更新预约桌号时先清空再插入，避免逻辑删除导致唯一约束冲突）
     *
     * @param reservationId 预约ID
     * @return 删除行数
     */
    int physicalDeleteByReservationId(@Param("reservationId") Integer reservationId);
}
