package cn.reghao.tnb.user.api.dto;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;

/**
 * @author reghao
 * @date 2023-08-24 16:22:48
 */
@NoArgsConstructor
@Setter
@Getter
public class UserCard implements Serializable {
    private static final long serialVersionUID = 1L;

    private String userId;
    private String screenName;
    private String avatarUrl;
    private int gender;
    private int following;
    private int follower;
    private boolean followed;

    public UserCard(UserInfo userInfo, String userIdStr, boolean followed) {
        this.userId = userIdStr;
        this.screenName = userInfo.getScreenName();
        this.avatarUrl = userInfo.getAvatarUrl();
        this.gender = userInfo.getGender();
        this.following = userInfo.getFollowing();
        this.follower = userInfo.getFollower();
        this.followed = followed;
    }
}
