package com.ffii.fpsms.model;

import java.io.Serializable;
import java.util.List;
import java.util.Set;

import com.ffii.fpsms.modules.user.entity.User;

public class JwtResponse implements Serializable {

	private static final long serialVersionUID = -8091879091924046844L;
	private final Long id;
	private final String name;
	private final String email;
	private final String accessToken;
	private final String refreshToken;
	private final String role;
	private final List<String> abilities;
//	private final Set<AbilityModel> abilities;

	public JwtResponse(String accessToken, String refreshToken, String role, User user, List<String> abilities) {
//	public JwtResponse(String accessToken, String refreshToken, String role, User user, Set<AbilityModel> abilities) {
		this.accessToken = accessToken;
		this.refreshToken = refreshToken;
		this.role = role;
		this.id = user.getId();
		this.name = user.getName();
		this.email = user.getEmail();
		this.abilities = abilities;
	}

	public String getAccessToken() {
		return this.accessToken;
	}

	public String getRole() {
		return role;
	}

	public String getRefreshToken() {
		return refreshToken;
	}

	public Long getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	public String getEmail() {
		return email;
	}

	public List<String> getAbilities() {
		return abilities;
	}
}