package com.lesingle.edu.common.mapper;

import com.lesingle.edu.dto.response.TenantCourseResponse;
import com.lesingle.edu.entity.TenantCourse;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * TenantCourse Entity Mapper
 */
@Mapper(componentModel = "spring")
public interface TenantCourseMapper {

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

    /**
     * Entity 转 Response
     */
    TenantCourseResponse toVO(TenantCourse entity);

    /**
     * Entity 列表转 Response 列表
     */
    List<TenantCourseResponse> toVO(List<TenantCourse> entities);

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