package com.lesingle.edu.common.mapper;

import com.lesingle.edu.dto.response.CourseScriptPageResponse;
import com.lesingle.edu.entity.CourseScriptPage;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * CourseScriptPage Entity Mapper
 */
@Mapper(componentModel = "spring")
public interface CourseScriptPageMapper {

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

    /**
     * Entity 转 Response
     */
    CourseScriptPageResponse toVO(CourseScriptPage entity);

    /**
     * Entity 列表转 Response 列表
     */
    List<CourseScriptPageResponse> toVO(List<CourseScriptPage> entities);

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