package com.lesingle.edu.common.mapper;

import com.lesingle.edu.dto.response.ClassTeacherResponse;
import com.lesingle.edu.entity.ClassTeacher;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * ClassTeacher Entity Mapper
 */
@Mapper(componentModel = "spring")
public interface ClassTeacherMapper {

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

    /**
     * Entity 转 Response
     */
    ClassTeacherResponse toVO(ClassTeacher entity);

    /**
     * Entity 列表转 Response 列表
     */
    List<ClassTeacherResponse> toVO(List<ClassTeacher> entities);

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