package com.jwipc.supplier.convert;

import com.jwipc.supplier.dto.QualificationsItemRegisterDTO;
import com.jwipc.supplier.dto.SupplierQualificationBaseDTO;
import com.jwipc.supplier.dto.SupplierQualificationListDTO;
import com.jwipc.supplier.entity.QualificationTemplateItem;
import com.jwipc.supplier.entity.SupplierQualification;
import com.jwipc.supplier.entity.SupplierQualificationChangeItem;
import com.jwipc.supplier.model.po.SupplierQualificationPO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;


@Mapper(componentModel = "spring")
public interface SupplierQualificationConvert {
    List<QualificationsItemRegisterDTO> entities2DTOS(List<QualificationTemplateItem> qualificationsTemplateItemList);
    @Mapping(source = "id", target = "templateItemId")
    @Mapping(source = "fileId", target = "simpleFileId")
    QualificationsItemRegisterDTO entity2DTO(QualificationTemplateItem qualificationsTemplateItem);

    List<SupplierQualification> dtos2Entities(List<SupplierQualificationBaseDTO> attachmentList);

    List<SupplierQualificationListDTO> entities2ListDtos(List<SupplierQualification> list);

    List<SupplierQualificationBaseDTO> entities2BaseDtos(List<SupplierQualification> list);
    List<SupplierQualificationBaseDTO> pos2BaseDtos(List<SupplierQualificationPO> list);

    List<SupplierQualificationChangeItem> toChangeEntities(List<SupplierQualification> list);

    SupplierQualification copy1(SupplierQualification supplierQualification);
}
