support sponsor supporter

This commit is contained in:
MathieuG-P
2022-09-11 23:14:18 +02:00
parent f85e991971
commit b3108b86f4
3 changed files with 27 additions and 25 deletions
@@ -4,5 +4,5 @@ export interface Supporter {
username: string,
type?: SupporterType,
link?: string,
image?: string,
img?: string,
}
@@ -1,19 +0,0 @@
import { SupporterType } from "./supporter.type";
import { SupporterInterface } from "./supporter.interface";
export class SupporterModel{
constructor(private args: SupporterInterface){}
public get username(): string{ return this.args.username; }
public get type(): SupporterType{ return this.args.type; }
public get link(): string{
if(this.type === "basic"){ return null; }
return this.args.link;
}
public get image(): string{
if(this.type !== "sponsor"){ return null; }
return this.args.image;
}
}