feat: add author id to class

This commit is contained in:
Oliver Booth 2023-08-11 16:34:10 +01:00
parent 049601a6fb
commit 37a35d5aab
Signed by: oliverbooth
GPG Key ID: 725DB725A0D9EE61
1 changed files with 7 additions and 0 deletions

View File

@ -1,12 +1,18 @@
class Author {
private readonly _id: string;
private readonly _name: string;
private readonly _avatarHash: string;
constructor(json: any) {
this._id = json.id;
this._name = json.name;
this._avatarHash = json.avatarHash;
}
get id(): string {
return this._id;
}
get name(): string {
return this._name;
}
@ -15,4 +21,5 @@ class Author {
return this._avatarHash;
}
}
export default Author;