package com.lesingle.edu.common.mapper;

import com.lesingle.edu.dto.response.LessonStepResourceResponse;
import com.lesingle.edu.entity.LessonStepResource;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * LessonStepResource Entity Mapper
 */
@Mapper(componentModel = "spring")
public interface LessonStepResourceMapper {

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

    /**
     * Entity 转 Response
     */
    LessonStepResourceResponse toVO(LessonStepResource entity);

    /**
     * Entity 列表转 Response 列表
     */
    List<LessonStepResourceResponse> toVO(List<LessonStepResource> entities);

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