package dev.peerat.backend.model;

import org.jose4j.jwt.JwtClaims;

import dev.peerat.mapping.Treasure;

@Treasure
public class PeerAtUser extends dev.peerat.framework.User{
	
	private int id;
	private String pseudo;
	private String email;
	private String fistName;
	private String lastName;
	private School school;
	
	public PeerAtUser(int id){
		this.id = id;
	}
	
	public PeerAtUser(JwtClaims claims){
		this.id = ((Long) claims.getClaimValue("id")).intValue();
	}
	
	@Override
	public void write(JwtClaims claims){
		claims.setClaim("id", this.id);
	}

	public int getId(){
		return this.id;
	}
	
	public String getPseudo(){
		return this.pseudo;
	}
	
	public String getEmail(){
		return this.email;
	}
	
	public String getFirstName(){
		return this.fistName;
	}
	
	public String getLastName(){
		return this.lastName;
	}
	
	public School getSchool(){
		return this.school;
	}
}
