feat(database): add CRUD operations for parsed sessions and update session name functionality
This commit is contained in:
@@ -48,6 +48,22 @@ export namespace model {
|
||||
this.heroes = source["heroes"];
|
||||
}
|
||||
}
|
||||
export class ParsedSession {
|
||||
id: number;
|
||||
session_name: string;
|
||||
created_at: number;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new ParsedSession(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.id = source["id"];
|
||||
this.session_name = source["session_name"];
|
||||
this.created_at = source["created_at"];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user