package cn.fateverse.admin.convert;

import cn.fateverse.admin.dto.UserDto;
import cn.fateverse.admin.vo.UserVo;
import cn.fateverse.common.core.convert.BaseConvertDefine;
import cn.fateverse.common.core.entity.User;
import cn.fateverse.common.core.entity.UserDetail;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

@Mapper
public interface UserConvert extends BaseConvertDefine<UserDto, User, UserVo> {
    UserConvert INSTANCE = Mappers.getMapper(UserConvert.class);

    /**
     * 实体到细节
     *
     * @param user 用户
     * @return {@link UserDetail }
     */
    UserDetail entityToDetail(User user);
}
