1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-11-23 05:49:23 +00:00
comunicapiv2/src/entities/User.ts

44 lines
834 B
TypeScript

import { AccountImage } from "./AccountImage";
/**
* User information
*
* @author Pierre HUBERT
*/
export enum UserPageStatus {
PRIVATE,
PUBLIC,
OPEN
}
export interface UserBuilder {
id: number,
firstName: string,
lastName: string,
timeCreate: number,
virtualDirectory: string,
pageStatus: UserPageStatus,
accountImage: AccountImage,
}
export class User {
id: number;
firstName: string;
lastName: string;
timeCreate: number;
virtualDirectory: string;
pageStatus: UserPageStatus;
accountImage: AccountImage;
public constructor(info : UserBuilder) {
this.id = info.id;
this.firstName = info.firstName;
this.lastName = info.lastName;
this.timeCreate = info.timeCreate;
this.virtualDirectory = info.virtualDirectory;
this.pageStatus = info.pageStatus;
this.accountImage = info.accountImage;
}
}