package com.micer.easyball.pojo.Dto;

import com.micer.easyball.pojo.User;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserDto extends User {
    /**
     * 上次登录的俱乐部
     */
    private String lastClubId;

    /**
     * 上次登录的俱乐部名
     */
    private String lastClubName;

    /**
     *  俱乐部中的角色
     */
    private String clubRole;

    public UserDto(User user)
    {
        this.setId(user.getId());
        this.setUsername(user.getUsername());
        this.setCurrentRole(user.getCurrentRole());
        this.setCreateAt(user.getCreateAt());
        this.setRoleList(user.getRoleList());
        this.setTelephone(user.getTelephone());
        this.setLastClubId("");
        this.setLastClubName("");
    }
}
