package com.ga.core.mapper.notice;

import com.ga.core.vo.notice.NoticeResp;
import com.ga.core.vo.notice.NoticeSearchParam;
import com.ga.core.vo.notice.NoticeVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface NoticeMapper {
    NoticeResp selectById(@Param("noticeId") Long noticeId);
    List<NoticeResp> selectList(NoticeSearchParam param);
    /** 오늘 기준 유효한 공지 목록 (start_date <= today <= end_date OR end_date IS NULL) */
    List<NoticeResp> selectActive();
    int insert(NoticeVO vo);
    int update(NoticeVO vo);
    int updateActive(@Param("noticeId") Long noticeId, @Param("isActive") boolean isActive);
    int delete(@Param("noticeId") Long noticeId);
}
