package com.xindazhou.business.convert.community.ban;

import com.xindazhou.business.controller.admin.community.ban.vo.BanRespVO;
import com.xindazhou.business.controller.admin.community.ban.vo.BanSaveReqVO;
import com.xindazhou.business.dal.community.dataobject.ban.BanDO;
import com.xindazhou.framework.common.pojo.PageResult;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * 封禁 Convert
 *
 * @author xindazhou
 */
@Mapper
public interface BanConvert {

    BanConvert INSTANCE = Mappers.getMapper(BanConvert.class);

    BanRespVO convert(BanDO bean);

    @Mapping(target = "id", ignore = true)
    @Mapping(target = "userNickname", ignore = true)
    BanDO convert(BanSaveReqVO bean);

    PageResult<BanRespVO> convertPage(PageResult<BanDO> page);

}

