package com.seer.teach.mall.convert;

import com.seer.teach.mall.entity.SenderConfigEntity;
import com.seer.teach.mall.request.SenderConfigReq;
import com.seer.teach.mall.response.SenderConfigResp;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface SenderConfigConvert {

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

    SenderConfigResp one(SenderConfigEntity senderConfigEntity);

    @Mapping( target = "deleted",ignore= true)
    @Mapping(source = "id",target = "id")
    SenderConfigEntity req2entity(SenderConfigReq senderConfigReq);

    List<SenderConfigResp> list(List<SenderConfigEntity> senderConfigEntities);
}
