package com.lesingle.edu.common.mapper;

import com.lesingle.edu.dto.response.SchedulePlanResponse;
import com.lesingle.edu.entity.SchedulePlan;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * SchedulePlan Entity Mapper
 */
@Mapper(componentModel = "spring")
public interface SchedulePlanMapper {

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

    /**
     * Entity 转 Response
     */
    SchedulePlanResponse toVO(SchedulePlan entity);

    /**
     * Entity 列表转 Response 列表
     */
    List<SchedulePlanResponse> toVO(List<SchedulePlan> entities);

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