Definition from current backend

This commit is contained in:
Ferdinand Thiessen 2020-11-18 02:49:19 +01:00
parent bda58426e3
commit 7612ccde7b
1 changed files with 12 additions and 14 deletions

View File

@ -13,9 +13,9 @@ declare namespace FG {
firstname: string;
lastname: string;
mail: string;
avatar_url?: string;
birthday?: Date;
roles: Array<string>;
avatar_url?: string;
}
type Permission = string;
interface Role {
@ -37,26 +37,24 @@ declare namespace FG {
start: Date;
description?: string;
type: EventType;
slots: Array<EventSlot>;
}
interface EventSlot {
id: number;
start: Date;
end?: Date;
jobs: Array<JobSlot>;
jobs: Array<Job>;
}
type EventType = string;
interface Job {
userid: string;
value: number;
}
interface JobSlot {
id: number;
start: Date;
end?: Date;
comment: string;
type: JobType;
users: Array<Job>;
required_jobs: number;
services: Array<Service>;
required_services: number;
}
interface JobType {
id: number;
name: string;
}
interface Service {
userid: string;
value: number;
}
}