package com.seer.teach.teacher.convert;

import com.seer.teach.teacher.module.entity.EvaluationTasksEntity;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.time.LocalDateTime;


/**
 * <p>
 *
 * </p >
 *
 * @author Captain
 * @since 2025-08-02 20:00
 */
@Mapper
public interface TaskConvert {

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

    @Mapping(source = "knowId", target = "knowId")
    @Mapping(source = "userId", target = "userId")
    @Mapping(source = "subjectId", target = "subjectId")
    @Mapping(source = "gradeId", target = "gradeId")
    @Mapping(source = "status", target = "status")
    @Mapping(source = "questionCount", target = "questionCount")
    @Mapping(target = "correctRate", ignore = true)
    EvaluationTasksEntity toEvaluationTaskEntity(Integer userId,Integer knowId,Integer subjectId,Integer gradeId,Integer status,LocalDateTime questionStartTime,Integer questionCount);

}
