OOP zu BuLi-Tipp hinzugefügt

This commit is contained in:
R40fendt
2025-05-06 10:28:26 +02:00
parent 85db79ba5d
commit 3323ee1f8f
8 changed files with 83 additions and 32 deletions

View File

@@ -1,4 +1,26 @@
export default class RitzenbergenLib {
class User {
public username: string;
public kuerzel: string;
public points: number;
public id: number;
constructor (username: string, kuerzel: string, points: number, id: number) {
this.username = username;
this.kuerzel = kuerzel;
this.points=points;
this.id=id;
}
}
class SpieltagSumme {
public user: User;
public tsPoints: number;
constructor (user: User, tsPoints: number) {
this.user = user;
this.tsPoints = tsPoints;
}
}
class RitzenbergenLib {
static get_img(mypath: string) {
if(mypath.startsWith("/")) return "http://bilder.ritzenbergen.de"+mypath;
else return "http://bilder.ritzenbergen.de/"+mypath;
@@ -7,4 +29,10 @@ export default class RitzenbergenLib {
if(path.startsWith("/")) return "http://192.168.188.38/Jonas/ritzenbergenapi"+path;
else return "http://192.168.188.38/Jonas/ritzenbergenapi/"+path;
}
}
}
export default {
RitzenbergenLib,
User,
SpieltagSumme
}