// Programmiert von Samuel Wolff
// Noch nicht getestet

package Logik;

import RestAPISchnittstelle.RestApiClient;

public class Account {

	// region Felder
	private String passwort;

	private /*transient*/ int id;

	private String name;

	private String email;

	private int rid;
	// endregion

	// region Getter & Setter
	public String getPasswort() {
		return passwort;
	}

	public void setPasswort(String passwort) {
		this.passwort = passwort;
	}

	public int getId() {
		return id;
	}

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

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}


	public String getBenutzername() {
		return name;
	}

	public void setBenutzername(String benutzername) {
		this.name = benutzername;
	}
	// endregion

	// region Konstruktoren
	public Account(String passwort, String name, String email) {
		this.passwort = passwort;
		this.name = name;
		this.email = email;

		if(this instanceof MitarbeiterAccount)
			rid = 0;
		else if (this instanceof ElternAccount)
			rid = 1;
	}

	public Account(int id, String passwort, String name, String email) {
		this.id = id;
		this.passwort = passwort;
		this.name = name;
		this.email = email;

		if(this instanceof MitarbeiterAccount)
			rid = 0;
		else if (this instanceof ElternAccount)
			rid = 1;
	}
	// endregion
}
