package com.lesingle.edu.common.mapper;

import com.lesingle.edu.dto.response.LessonStepResponse;
import com.lesingle.edu.entity.LessonStep;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * LessonStep Entity Mapper
 */
@Mapper(componentModel = "spring")
public interface LessonStepMapper {

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

    /**
     * Entity 转 Response
     */
    LessonStepResponse toVO(LessonStep entity);

    /**
     * Entity 列表转 Response 列表
     */
    List<LessonStepResponse> toVO(List<LessonStep> entities);

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