Travel list

This commit is contained in:
Eneko Nieto
2021-01-22 02:34:32 +01:00
parent d133876325
commit 6bb528e5fc
16 changed files with 349 additions and 30 deletions

View File

@@ -0,0 +1,10 @@
export interface ApiResponse<T> {
success: boolean;
data?: T;
error?: ApiError;
}
export interface ApiError {
code: string;
msg?: string;
}

View File

@@ -0,0 +1,15 @@
import { User } from './user';
export type TravelId = number;
export interface Travel {
id: Travel;
driver: User;
travelers: User[];
departureDate: string;
origin: string;
destination: string;
availablePlaces: number;
description?: string;
matrixRoomId: string;
}

7
src/app/entities/user.ts Normal file
View File

@@ -0,0 +1,7 @@
export type UserId = string;
export interface User {
id: UserId;
matrixId?: string;
name: string;
}