package com.lesingle.edu.common.mapper;

import com.lesingle.edu.dto.response.NotificationResponse;
import com.lesingle.edu.entity.Notification;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * Notification Entity Mapper
 */
@Mapper(componentModel = "spring")
public interface NotificationMapper {

    NotificationMapper INSTANCE = Mappers.getMapper(NotificationMapper.class);

    /**
     * Entity 转 Response
     */
    NotificationResponse toVO(Notification entity);

    /**
     * Entity 列表转 Response 列表
     */
    List<NotificationResponse> toVO(List<Notification> entities);

    /**
     * Response 转 Entity（用于创建/更新时）
     */
    Notification toEntity(NotificationResponse vo);
}
