1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2025-04-03 19:42:37 +00:00
comunicapiv2/src/entities/AccountExport.ts

30 lines
564 B
TypeScript

/**
* Account data export
*
* @author Pierre Hubert
*/
import { User } from "./User";
import { Post } from "./Post";
import { Comment } from "./Comment";
export interface AccountExportBuilder {
userID: number;
userInfo: User;
postsList: Post[];
comments: Comment[];
}
export class AccountExport implements AccountExportBuilder {
userID: number;
userInfo: User;
postsList: Post[];
comments: Comment[];
public constructor(info: AccountExportBuilder) {
for (const key in info) {
if (info.hasOwnProperty(key))
this[key] = info[key];
}
}
}