package com.hys.app.converter.erp;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hys.app.model.erp.entity.Company;
import com.hys.app.model.erp.entity.CompanyDO;
import com.hys.app.model.erp.entity.CompanyUpdateDO;
import com.hys.app.model.erp.entity.CompanyVO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingConstants;
import org.mapstruct.MappingTarget;
import org.mapstruct.factory.Mappers;

@Mapper(componentModel = MappingConstants.ComponentModel.SPRING)
public interface CompanyConverter {
    CompanyConverter INSTANCE = Mappers.getMapper(CompanyConverter.class);

    Company convert(CompanyDO bean);

    void convert(@MappingTarget Company company , CompanyUpdateDO updateDO);

    CompanyVO convert(Company bean);

    Page<CompanyVO> convert(Page<Company> bean);
}
