package com.lesingle.edu.common.mapper;

import com.lesingle.edu.dto.response.CoursePackageCourseResponse;
import com.lesingle.edu.entity.CoursePackageCourse;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * CoursePackageCourse Entity Mapper
 */
@Mapper(componentModel = "spring")
public interface CoursePackageCourseMapper {

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

    /**
     * Entity 转 Response
     */
    CoursePackageCourseResponse toVO(CoursePackageCourse entity);

    /**
     * Entity 列表转 Response 列表
     */
    List<CoursePackageCourseResponse> toVO(List<CoursePackageCourse> entities);

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