package com.tashow.cloud.user.convert.user;

import com.tashow.cloud.common.pojo.PageResult;
import com.tashow.cloud.userapi.api.user.dto.UserMemberRespDTO;
import com.tashow.cloud.user.controller.admin.user.vo.UserLoginRespVO;
import com.tashow.cloud.user.controller.admin.user.vo.MemberUserUpdateReqVO;
import com.tashow.cloud.user.controller.app.user.vo.AppMemberUserInfoRespVO;
import com.tashow.cloud.user.dal.dataobject.user.UserLoginDO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;


@Mapper
public interface MemberUserConvert {

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

    AppMemberUserInfoRespVO convert(UserLoginDO bean);


    @Mappings({
            @Mapping(source = "bean.id", target = "id"),
    })
    UserMemberRespDTO convert2(UserLoginDO bean);

    List<UserMemberRespDTO> convertList2(List<UserLoginDO> list);

    UserLoginDO convert(MemberUserUpdateReqVO bean);

    PageResult<UserLoginRespVO> convertPage(PageResult<UserLoginDO> page);

    UserLoginRespVO convert03(UserLoginDO bean);

}
