package jnpf.model.cultivate.vo.offline;

import jnpf.permission.model.user.PartUserInfoVo;
import jnpf.permission.vo.v2.user.UserBoundVO;
import lombok.Data;

/**
 * 用户信息
 *
 * @author fantaibao
 * @date 2023/12/19
 */
@Data
public class UserInfoVO {
    /**
     * 用户id
     */
    private String userId;
    /**
     * 用户名称
     */
    private String userName;
    /**
     * 用户头像
     */
    private String profilePicture;

    /**
     * 是否签到,0未签到1已签到
     */
    private Integer checkInOrNot;

    public static UserInfoVO convertUserInfoVO(UserBoundVO partUserInfoVo) {
        UserInfoVO userInfoVO = new UserInfoVO();
        userInfoVO.setUserId(partUserInfoVo.getId());
        userInfoVO.setUserName(partUserInfoVo.getUserName());
        userInfoVO.setProfilePicture("/api/file/Image/userAvatar/" + partUserInfoVo.getHeadIcon());
        return userInfoVO;
    }

}
