package com.uca.entity;

import java.time.LocalDate;

public class UserEntity {
    private int id;
    private String firstName;
    private String lastName;

    private String identifier;

    private String password;

    private LocalDate lastConnection;

    private int nbUpgrades;

    public UserEntity() {
        //Ignored !
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String getIdentifier() {
        return identifier;
    }

    public void setIdentifier(String identifier) {
        this.identifier = identifier;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public LocalDate getLastConnection() {
        return lastConnection;
    }

    public void setLastConnection(LocalDate lastConnection) {
        this.lastConnection = lastConnection;
    }

    public int getNbUpgrades() {
        return this.nbUpgrades;
    }

    public void setNbUpgrades(int nbUpgrades) {
        this.nbUpgrades = nbUpgrades;
    }

    public void resetNbUpgrades() {
        this.nbUpgrades = 5;
    }

    public void useOneUpgrade() {
        this.nbUpgrades--;
    }
}
