package org.qinan.safetyeval.infrastructure.convertor;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.qinan.safetyeval.client.change.request.QualFilingPersonnelCertChangePageQry;
import org.qinan.safetyeval.client.change.response.QualFilingPersonnelCertChangeCo;
import org.qinan.safetyeval.domain.change.model.QualFilingPersonnelCertChangeE;
import org.qinan.safetyeval.infrastructure.dataobject.OrgPersonnelCertDO;
import org.qinan.safetyeval.infrastructure.persistence.domainobject.QualFilingPersonnelCertChangeDO;

import java.util.List;


/**
 * 备案申请人员证书对象转换
 *
 * @Author: ltq
 * @date 2026-07-02 10:04:23
 */
@Mapper(componentModel = "spring")
public interface QualFilingPersonnelCertChangeDoConvertor {
    /**
     * 领域对象转DO
     *
     * @param qualFilingPersonnelCertChangeE
     * @return
     */
    QualFilingPersonnelCertChangeDO convertEeToDo(QualFilingPersonnelCertChangeE qualFilingPersonnelCertChangeE);

    /**
     * DO转Co
     *
     * @param qualFilingPersonnelCertChangeDo DO
     * @return
     */

    QualFilingPersonnelCertChangeCo converDoToCo(QualFilingPersonnelCertChangeDO qualFilingPersonnelCertChangeDo);

    /**
     * qry TO DO
     *
     * @param qualFilingPersonnelCertChangePageQry
     * @return
     */

    QualFilingPersonnelCertChangeDO convertQryToDo(QualFilingPersonnelCertChangePageQry qualFilingPersonnelCertChangePageQry);

    /**
     * DOs转Cos
     *
     * @param qualFilingPersonnelCertChangeDos dos
     * @return
     */
    List<QualFilingPersonnelCertChangeCo> converDosToCos(List<QualFilingPersonnelCertChangeDO> qualFilingPersonnelCertChangeDos);

    /**
     * DO转领域对象
     */
    QualFilingPersonnelCertChangeE converDoToEe(QualFilingPersonnelCertChangeDO qualFilingPersonnelCertChangeDO);

    /**
     * DOs转领域对象列表
     */
    List<QualFilingPersonnelCertChangeE> converDosToEes(List<QualFilingPersonnelCertChangeDO> qualFilingPersonnelCertChangeDOs);

    /**
     * OrgPersonnelCertDO转QualFilingPersonnelCertChangeDO
     *
     * @param orgPersonnelCertDO
     * @return
     */
    @Mapping(target = "id", ignore = true)
    @Mapping(target = "filingChangeId", ignore = true)
    @Mapping(target = "filingPersonnelId", source = "personnelId")
    @Mapping(target = "sourceCertId", source = "id")
    QualFilingPersonnelCertChangeDO convertOrgDoToChangeDo(OrgPersonnelCertDO orgPersonnelCertDO);
}
