package com.seer.teach.admin.convert;

import com.seer.teach.admin.request.KnowSummariesReq;
import com.seer.teach.admin.response.KnowSummaryResp;
import com.seer.teach.teacher.module.entity.KnowSummaryEntity;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * <p>
 * 知识点摘要转换器
 * </p>
 *
 * @author ZS
 * @since 2025-10-24
 */
@Mapper
public interface KnowSummariesConvert {

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

    /**
     * 将KnowSummariesEntity转换为KnowSummariesResp
     *
     * @param entity 知识点摘要实体
     * @return 知识点摘要响应参数
     */
    KnowSummaryResp toResp(KnowSummaryEntity entity);

    /**
     * 将KnowSummariesReq转换为KnowSummariesEntity
     *
     * @param req 知识点摘要请求参数
     * @return 知识点摘要实体
     */
    KnowSummaryEntity toEntity(KnowSummariesReq req);

    /**
     * 将KnowSummariesEntity列表转换为KnowSummariesResp列表
     *
     * @param entities 知识点摘要实体列表
     * @return 知识点摘要响应参数列表
     */
    List<KnowSummaryResp> toRespList(List<KnowSummaryEntity> entities);
}