mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
supporters full integrated exept sponsors item
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
export { SupporterType } from "./supporter.type";
|
||||
export { Supporter } from "./supporter.interface";
|
||||
@@ -0,0 +1,8 @@
|
||||
import { SupporterType } from "./supporter.type";
|
||||
|
||||
export interface Supporter {
|
||||
username: string,
|
||||
type?: SupporterType,
|
||||
link?: string,
|
||||
image?: string,
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export type SupporterType = "gold"|"diamond"|"sponsor"
|
||||
Reference in New Issue
Block a user