Fix routing between BE & FE and fix event creation
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user