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

39 lines
687 B
TypeScript
Raw Normal View History

/**
* 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,
}
export class User {
id: number;
firstName: string;
lastName: string;
timeCreate: number;
virtualDirectory: string;
pageStatus: UserPageStatus;
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;
}
}