2023-12-12 23:50:10 +01:00
|
|
|
// Programmiert von Samuel Wolff
|
|
|
|
// Noch nicht getestet
|
|
|
|
|
|
|
|
package Logik;
|
|
|
|
|
2024-01-17 11:21:26 +01:00
|
|
|
import RestAPISchnittstelle.RestApiClient;
|
|
|
|
|
2023-12-12 23:50:10 +01:00
|
|
|
public class Account {
|
|
|
|
|
2023-12-13 00:01:35 +01:00
|
|
|
// region Felder
|
2023-12-12 23:50:10 +01:00
|
|
|
private String passwort;
|
|
|
|
|
2024-01-08 11:13:24 +01:00
|
|
|
private transient int id;
|
2023-12-12 23:50:10 +01:00
|
|
|
|
2024-01-08 11:13:24 +01:00
|
|
|
private String name;
|
|
|
|
|
2024-01-13 14:29:57 +01:00
|
|
|
private String email;
|
|
|
|
|
2024-01-08 11:13:24 +01:00
|
|
|
private int rid;
|
2023-12-13 00:01:35 +01:00
|
|
|
// endregion
|
2023-12-12 23:50:10 +01:00
|
|
|
|
2023-12-13 00:01:35 +01:00
|
|
|
// region Getter & Setter
|
2023-12-12 23:50:10 +01:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2024-01-13 14:29:57 +01:00
|
|
|
public String getEmail() {
|
|
|
|
return email;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setEmail(String email) {
|
|
|
|
this.email = email;
|
|
|
|
}
|
|
|
|
|
2023-12-12 23:50:10 +01:00
|
|
|
|
|
|
|
public String getBenutzername() {
|
2024-01-08 11:13:24 +01:00
|
|
|
return name;
|
2023-12-12 23:50:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public void setBenutzername(String benutzername) {
|
2024-01-08 11:13:24 +01:00
|
|
|
this.name = benutzername;
|
2023-12-12 23:50:10 +01:00
|
|
|
}
|
2023-12-13 00:01:35 +01:00
|
|
|
// endregion
|
2023-12-12 23:50:10 +01:00
|
|
|
|
2023-12-13 00:01:35 +01:00
|
|
|
// region Konstruktoren
|
2024-01-13 14:29:57 +01:00
|
|
|
public Account(String passwort, String name, String email) {
|
2023-12-12 23:50:10 +01:00
|
|
|
this.passwort = passwort;
|
2024-01-08 11:13:24 +01:00
|
|
|
this.name = name;
|
2024-01-17 11:21:26 +01:00
|
|
|
this.email = email;
|
2024-01-08 11:13:24 +01:00
|
|
|
|
|
|
|
if(this instanceof MitarbeiterAccount)
|
|
|
|
rid = 0;
|
|
|
|
else if (this instanceof ElternAccount)
|
|
|
|
rid = 1;
|
2023-12-12 23:50:10 +01:00
|
|
|
}
|
2023-12-13 00:01:35 +01:00
|
|
|
// endregion
|
2023-12-12 23:50:10 +01:00
|
|
|
}
|