package com.jwipc.supplier.convert;

import com.jwipc.supplier.clent.dto.SupplierDTO;
import com.jwipc.supplier.dto.SupplierBankDTO;
import com.jwipc.supplier.dto.SupplierBaseDTO;
import com.jwipc.supplier.dto.SupplierReportDTO;
import com.jwipc.supplier.dto.SupplierSelectListDTO;
import com.jwipc.supplier.entity.Supplier;
import com.jwipc.supplier.entity.SupplierBank;
import com.jwipc.supplier.model.po.SupplierReportPO;
import com.jwipc.supplier.model.po.SupplierSelectPO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;


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

    List<SupplierSelectListDTO> pos2SelectListDTOs(List<SupplierSelectPO> list);


    List<SupplierBaseDTO> entities2BaseDtos(List<Supplier> suppliers);
    @Mapping(target = "supplierId", source = "id")
    SupplierBaseDTO supplierToSupplierBaseDTO(Supplier supplier);

    List<SupplierBankDTO> entityToDtoListBank(List<SupplierBank> supplierBanks);

    List<SupplierReportDTO> convert1(List<SupplierReportPO> forSupplierReportExport);

    SupplierDTO supplierToSupplierDTO(Supplier supplier);

}
