package com.jwipc.sys.convert;

import com.jwipc.sys.dto.UserDWTDTO;
import com.jwipc.sys.dto.UserDwtItemDTO;
import com.jwipc.sys.entity.DealtWithTargetType;
import com.jwipc.sys.model.po.UserDwtItemPO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;


@Mapper(componentModel = "spring")
public interface DealtWithTargetTypeConvert {

    List<UserDWTDTO> entities2DTOs(List<DealtWithTargetType> dealtWithTargetTypes);
    @Mapping(source = "id", target = "targetTypeId")
    @Mapping(source = "code", target = "targetTypeCode")
    @Mapping(source = "name", target = "targetTypeName")
    UserDWTDTO entityToDto(DealtWithTargetType dealtWithTargetType);
    List<UserDwtItemDTO> pos2DTOs(List<UserDwtItemPO> dwtList);
}
