package com.seer.teach.mp.app.convert;

import com.seer.teach.mp.app.controller.resp.AppActivityFormExecutionResp;
import com.seer.teach.mp.app.controller.resp.AppActivityFormFieldResp;
import com.seer.teach.mp.app.controller.resp.AppActivityFormResp;
import com.seer.teach.mp.entity.MpActivityFormExecutionEntity;
import com.seer.teach.mp.entity.MpActivityFormFieldEntity;
import com.seer.teach.mp.entity.MpActivityFormEntity;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

@Mapper
public interface AppActivityFormConvert {
    AppActivityFormConvert INSTANCE = Mappers.getMapper(AppActivityFormConvert.class);

    @Mapping(source = "fields", target = "fields", ignore = true)
    AppActivityFormResp convertToAppTemplateResp(MpActivityFormEntity entity);

    AppActivityFormFieldResp convertToAppFieldResp(MpActivityFormFieldEntity entity);

    AppActivityFormExecutionResp convertToAppExecutionResp(MpActivityFormExecutionEntity entity);
}