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

import com.seer.teach.mp.app.controller.req.AppAgentActivityQueryReq;
import com.seer.teach.mp.app.controller.resp.AppActivityResp;
import com.seer.teach.mp.entity.MpActivityEntity;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface AppAgentActivityConvert {

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

    MpActivityEntity convert(AppAgentActivityQueryReq req);

    @Mapping(target = "createTime", dateFormat = "yyyy-MM-dd HH:mm:ss")
    @Mapping(target = "updateTime", dateFormat = "yyyy-MM-dd HH:mm:ss")
    AppActivityResp convertToResp(MpActivityEntity entity);

    List<AppActivityResp> convertToRespList(List<MpActivityEntity> mpAgentActivityEntities);
}