package com.lesingle.edu.common.mapper;

import com.lesingle.edu.dto.response.TaskTargetResponse;
import com.lesingle.edu.entity.TaskTarget;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * TaskTarget Entity Mapper
 */
@Mapper(componentModel = "spring")
public interface TaskTargetMapper {

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

    /**
     * Entity 转 Response
     */
    TaskTargetResponse toVO(TaskTarget entity);

    /**
     * Entity 列表转 Response 列表
     */
    List<TaskTargetResponse> toVO(List<TaskTarget> entities);

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