package com.campus.activity.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.campus.activity.entity.Registration;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface RegistrationMapper extends BaseMapper<Registration> {

    IPage<com.campus.activity.vo.RegistrationVO> selectMyRegistrations(Page<Registration> page,
                                               @Param("userId") Long userId,
                                               @Param("status") Integer status);

    IPage<com.campus.activity.vo.RegistrationVO> selectActivityRegistrations(Page<Registration> page,
                                                     @Param("activityId") Long activityId);

    Registration selectByTicketCode(@Param("ticketCode") String ticketCode);
}