src/app/classes/user.ts
Firebase User
Properties |
constructor(authData: any)
|
||||||||
Defined in src/app/classes/user.ts:37
|
||||||||
Constructor
Parameters :
|
billingAdress |
billingAdress:
|
Type : Address
|
Defined in src/app/classes/user.ts:11
|
Billing adress |
deliveryAdress |
deliveryAdress:
|
Type : Address
|
Defined in src/app/classes/user.ts:13
|
delivery Adress |
email:
|
Type : string
|
Defined in src/app/classes/user.ts:15
|
|
eventCounter |
eventCounter:
|
Type : number
|
Defined in src/app/classes/user.ts:17
|
Event counter |
eventsLeft |
eventsLeft:
|
Type : number
|
Defined in src/app/classes/user.ts:19
|
Events left |
isValidated |
isValidated:
|
Type : boolean
|
Defined in src/app/classes/user.ts:21
|
is validated |
lastname |
lastname:
|
Type : string
|
Defined in src/app/classes/user.ts:23
|
Lastname |
name |
name:
|
Type : string
|
Defined in src/app/classes/user.ts:25
|
Name |
photographerUrl |
photographerUrl:
|
Type : string
|
Defined in src/app/classes/user.ts:27
|
Photographer URL |
photoUrl |
photoUrl:
|
Type : string
|
Defined in src/app/classes/user.ts:29
|
Photo URL |
roles |
roles:
|
Type : UserRoles
|
Defined in src/app/classes/user.ts:31
|
Roles |
salutation |
salutation:
|
Type : string
|
Defined in src/app/classes/user.ts:33
|
Salutation |
subscription |
subscription:
|
Type : EventpickingSub
|
Defined in src/app/classes/user.ts:35
|
Subscription |
uid |
uid:
|
Type : string
|
Defined in src/app/classes/user.ts:37
|
UID |
import { Address } from '../interfaces/address';
import { EventpickingSub } from '../interfaces/subscription';
import { UserRoles } from '../interfaces/user-roles';
/**
* Firebase User
* @author Daniel Sogl
*/
export class User {
/** Billing adress */
billingAdress: Address;
/** delivery Adress */
deliveryAdress: Address;
/** Email */
email: string;
/** Event counter */
eventCounter: number;
/** Events left */
eventsLeft: number;
/** is validated */
isValidated: boolean;
/** Lastname */
lastname: string;
/** Name */
name: string;
/** Photographer URL */
photographerUrl?: string;
/** Photo URL */
photoUrl?: string;
/** Roles */
roles: UserRoles;
/** Salutation */
salutation: string;
/** Subscription */
subscription: EventpickingSub;
/** UID */
uid: string;
/**
* Constructor
* @param {any} authData firebase user
*/
constructor(authData: any) {
this.billingAdress = {
city: '',
company: '',
email: '',
lastname: '',
name: '',
phone: '',
street: '',
streetnumber: '',
zip: ''
};
this.deliveryAdress = {
city: '',
company: '',
email: '',
lastname: '',
name: '',
phone: '',
street: '',
streetnumber: '',
zip: ''
};
this.email = authData.email;
this.eventCounter = 0;
this.eventsLeft = 1;
this.isValidated = false;
this.lastname = '';
this.name = '';
this.photographerUrl = authData.photographerUrl;
this.photoUrl = authData.photoUrl;
this.roles = { user: true, admin: false, photographer: false };
this.salutation = '';
this.subscription = { membership: 'user', premium: false, status: 'valid' };
this.uid = authData.uid;
}
}