package com.lesingle.edu.common.mapper;

import com.lesingle.edu.dto.response.TaskTemplateResponse;
import com.lesingle.edu.entity.TaskTemplate;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * TaskTemplate Entity Mapper
 */
@Mapper(componentModel = "spring")
public interface TaskTemplateMapper {

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

    /**
     * Entity 转 Response
     */
    TaskTemplateResponse toVO(TaskTemplate entity);

    /**
     * Entity 列表转 Response 列表
     */
    List<TaskTemplateResponse> toVO(List<TaskTemplate> entities);

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