package cn.reghao.tnb.auth.app.model.vo;

import cn.reghao.tnb.auth.api.dto.AccountInfo;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.List;

/**
 * @author reghao
 * @date 2025-12-08 15:56:24
 */
@AllArgsConstructor
@NoArgsConstructor
@Setter
@Getter
public class LoginAccount {
    private long userId;
    private String userIdStr;
    private String screenName;
    private String avatarUrl;
    private String username;
    private String mobile;
    private String email;
    private List<String> roles;

    public LoginAccount(AccountInfo accountInfo, List<String> roles) {
        this.userId = accountInfo.getUserId();
        this.userIdStr = accountInfo.getUserIdStr();
        this.screenName = accountInfo.getScreenName();
        this.avatarUrl = accountInfo.getAvatarUrl();
        this.username = accountInfo.getUsername();
        this.mobile = accountInfo.getMobile();
        this.email = accountInfo.getEmail();
        this.roles = roles;
    }
}
