Fix routing between BE & FE and fix event creation

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-03-05 12:07:58 +01:00
parent 6ee3233cc6
commit c1f07122d1
5 changed files with 66 additions and 47 deletions

View File

@@ -1,5 +1,5 @@
export interface IActor {
id: string;
id?: string;
url: string;
name: string;
domain: string|null;
@@ -10,6 +10,17 @@ export interface IActor {
bannerUrl: string;
}
export class Actor implements IActor {
avatarUrl: string = '';
bannerUrl: string = '';
domain: string | null = null;
name: string = '';
preferredUsername: string = '';
summary: string = '';
suspended: boolean = false;
url: string = '';
}
export interface IPerson extends IActor {
}
@@ -18,6 +29,8 @@ export interface IGroup extends IActor {
members: IMember[];
}
export class Person extends Actor implements IPerson {}
export enum MemberRole {
PENDING,
MEMBER,

View File

@@ -1,4 +1,4 @@
import { IActor } from './actor.model';
import {Actor, IActor} from './actor.model';
export enum EventStatus {
TENTATIVE,
@@ -70,3 +70,24 @@ export interface IEvent {
// online_address: Address;
// phone_address: string;
}
export class EventModel implements IEvent {
begins_on: Date = new Date();
category: Category = Category.MEETING;
description: string = '';
ends_on: Date = new Date();
join_options: EventJoinOptions = EventJoinOptions.FREE;
large_image: string = '';
local: boolean = true;
participants: IParticipant[] = [];
publish_at: Date = new Date();
status: EventStatus = EventStatus.CONFIRMED;
thumbnail: string = '';
title: string = '';
url: string = '';
uuid: string = '';
visibility: EventVisibility = EventVisibility.PUBLIC;
attributedTo: IActor = new Actor();
organizerActor: IActor = new Actor();
}