2019-03-22 09:57:14 +00:00
|
|
|
import { Actor, IActor } from './actor.model';
|
2019-03-22 16:35:07 +00:00
|
|
|
import { IAddress } from '@/types/address.model';
|
2019-01-21 14:08:22 +00:00
|
|
|
|
|
|
|
export enum EventStatus {
|
2019-02-22 10:24:41 +00:00
|
|
|
TENTATIVE,
|
|
|
|
CONFIRMED,
|
|
|
|
CANCELLED,
|
2019-01-21 14:08:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export enum EventVisibility {
|
2019-02-22 10:24:41 +00:00
|
|
|
PUBLIC,
|
|
|
|
UNLISTED,
|
|
|
|
RESTRICTED,
|
|
|
|
PRIVATE,
|
2019-02-01 11:33:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export enum EventJoinOptions {
|
2019-02-22 10:24:41 +00:00
|
|
|
FREE,
|
|
|
|
RESTRICTED,
|
|
|
|
INVITE,
|
2019-01-21 14:08:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export enum ParticipantRole {
|
2019-02-22 10:24:41 +00:00
|
|
|
NOT_APPROVED = 'not_approved',
|
|
|
|
PARTICIPANT = 'participant',
|
|
|
|
MODERATOR = 'moderator',
|
|
|
|
ADMINISTRATOR = 'administrator',
|
|
|
|
CREATOR = 'creator',
|
2019-01-21 14:08:22 +00:00
|
|
|
}
|
|
|
|
|
2019-02-22 15:54:01 +00:00
|
|
|
export enum Category {
|
|
|
|
BUSINESS = 'business',
|
|
|
|
CONFERENCE = 'conference',
|
|
|
|
BIRTHDAY = 'birthday',
|
|
|
|
DEMONSTRATION = 'demonstration',
|
|
|
|
MEETING = 'meeting',
|
2019-01-21 14:08:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IParticipant {
|
2019-02-22 10:24:41 +00:00
|
|
|
role: ParticipantRole;
|
|
|
|
actor: IActor;
|
|
|
|
event: IEvent;
|
2019-01-21 14:08:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IEvent {
|
2019-02-22 10:24:41 +00:00
|
|
|
id?: number;
|
|
|
|
uuid: string;
|
|
|
|
url: string;
|
|
|
|
local: boolean;
|
|
|
|
|
|
|
|
title: string;
|
|
|
|
description: string;
|
2019-02-22 15:54:01 +00:00
|
|
|
category: Category;
|
2019-02-22 10:24:41 +00:00
|
|
|
|
2019-03-22 09:57:14 +00:00
|
|
|
beginsOn: Date;
|
|
|
|
endsOn: Date;
|
|
|
|
publishAt: Date;
|
2019-02-22 10:24:41 +00:00
|
|
|
|
|
|
|
status: EventStatus;
|
|
|
|
visibility: EventVisibility;
|
|
|
|
|
2019-03-22 09:57:14 +00:00
|
|
|
joinOptions: EventJoinOptions;
|
2019-02-22 10:24:41 +00:00
|
|
|
|
|
|
|
thumbnail: string;
|
2019-03-22 09:57:14 +00:00
|
|
|
largeImage: string;
|
2019-02-22 10:24:41 +00:00
|
|
|
|
|
|
|
organizerActor: IActor;
|
|
|
|
attributedTo: IActor;
|
|
|
|
participants: IParticipant[];
|
|
|
|
|
2019-03-22 14:51:23 +00:00
|
|
|
onlineAddress?: string;
|
|
|
|
phoneAddress?: string;
|
|
|
|
physicalAddress?: IAddress;
|
2019-02-22 10:24:41 +00:00
|
|
|
}
|
2019-03-05 11:07:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
export class EventModel implements IEvent {
|
2019-03-22 09:57:14 +00:00
|
|
|
beginsOn: Date = new Date();
|
2019-03-05 11:07:58 +00:00
|
|
|
category: Category = Category.MEETING;
|
|
|
|
description: string = '';
|
2019-03-22 09:57:14 +00:00
|
|
|
endsOn: Date = new Date();
|
|
|
|
joinOptions: EventJoinOptions = EventJoinOptions.FREE;
|
|
|
|
largeImage: string = '';
|
2019-03-05 11:07:58 +00:00
|
|
|
local: boolean = true;
|
|
|
|
participants: IParticipant[] = [];
|
2019-03-22 09:57:14 +00:00
|
|
|
publishAt: Date = new Date();
|
2019-03-05 11:07:58 +00:00
|
|
|
status: EventStatus = EventStatus.CONFIRMED;
|
|
|
|
thumbnail: string = '';
|
|
|
|
title: string = '';
|
|
|
|
url: string = '';
|
|
|
|
uuid: string = '';
|
|
|
|
visibility: EventVisibility = EventVisibility.PUBLIC;
|
|
|
|
attributedTo: IActor = new Actor();
|
|
|
|
organizerActor: IActor = new Actor();
|
2019-03-22 14:51:23 +00:00
|
|
|
onlineAddress: string = '';
|
|
|
|
phoneAddress: string = '';
|
2019-03-22 09:57:14 +00:00
|
|
|
}
|