package com.lesingle.edu.common.mapper;

import com.lesingle.edu.dto.response.ParentStudentResponse;
import com.lesingle.edu.entity.ParentStudent;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * ParentStudent Entity Mapper
 */
@Mapper(componentModel = "spring")
public interface ParentStudentMapper {

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

    /**
     * Entity 转 Response
     */
    ParentStudentResponse toVO(ParentStudent entity);

    /**
     * Entity 列表转 Response 列表
     */
    List<ParentStudentResponse> toVO(List<ParentStudent> entities);

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