package com.lesingle.edu.common.mapper;

import com.lesingle.edu.dto.response.StudentRecordResponse;
import com.lesingle.edu.entity.StudentRecord;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * StudentRecord Entity Mapper
 */
@Mapper(componentModel = "spring")
public interface StudentRecordMapper {

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

    /**
     * Entity 转 Response
     */
    StudentRecordResponse toVO(StudentRecord entity);

    /**
     * Entity 列表转 Response 列表
     */
    List<StudentRecordResponse> toVO(List<StudentRecord> entities);

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