@@ -10,6 +10,8 @@ export interface IActor {
|
||||
suspended: boolean;
|
||||
avatar: IPicture | null;
|
||||
banner: IPicture | null;
|
||||
|
||||
displayName();
|
||||
}
|
||||
|
||||
export class Actor implements IActor {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { IParticipant } from '@/types/event.model';
|
||||
|
||||
export enum ICurrentUserRole {
|
||||
USER = 'USER',
|
||||
MODERATOR = 'MODERATOR',
|
||||
@@ -9,4 +11,5 @@ export interface ICurrentUser {
|
||||
email: string;
|
||||
isLoggedIn: boolean;
|
||||
role: ICurrentUserRole;
|
||||
participations: IParticipant[];
|
||||
}
|
||||
|
||||
@@ -50,6 +50,20 @@ export interface IParticipant {
|
||||
event: IEvent;
|
||||
}
|
||||
|
||||
export class Participant implements IParticipant {
|
||||
event!: IEvent;
|
||||
actor!: IActor;
|
||||
role: ParticipantRole = ParticipantRole.NOT_APPROVED;
|
||||
|
||||
constructor(hash?: IParticipant) {
|
||||
if (!hash) return;
|
||||
|
||||
this.event = new EventModel(hash.event);
|
||||
this.actor = new Actor(hash.actor);
|
||||
this.role = hash.role;
|
||||
}
|
||||
}
|
||||
|
||||
export interface IOffer {
|
||||
price: number;
|
||||
priceCurrency: string;
|
||||
@@ -203,6 +217,7 @@ export class EventModel implements IEvent {
|
||||
this.onlineAddress = hash.onlineAddress;
|
||||
this.phoneAddress = hash.phoneAddress;
|
||||
this.physicalAddress = hash.physicalAddress;
|
||||
this.participantStats = hash.participantStats;
|
||||
|
||||
this.tags = hash.tags;
|
||||
if (hash.options) this.options = hash.options;
|
||||
|
||||
Reference in New Issue
Block a user