2019-11-23 15:10:51 +00:00
|
|
|
import { AccountImage } from "./AccountImage";
|
|
|
|
|
2019-11-23 14:11:33 +00:00
|
|
|
/**
|
|
|
|
* 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,
|
2019-11-23 15:10:51 +00:00
|
|
|
accountImage: AccountImage,
|
2019-11-23 14:11:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export class User {
|
|
|
|
id: number;
|
|
|
|
firstName: string;
|
|
|
|
lastName: string;
|
|
|
|
timeCreate: number;
|
|
|
|
virtualDirectory: string;
|
|
|
|
pageStatus: UserPageStatus;
|
2019-11-23 15:10:51 +00:00
|
|
|
accountImage: AccountImage;
|
2019-11-23 14:11:33 +00:00
|
|
|
|
|
|
|
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;
|
2019-11-23 15:10:51 +00:00
|
|
|
this.accountImage = info.accountImage;
|
2019-11-23 14:11:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|