Travel list
This commit is contained in:
10
src/app/entities/api-response.ts
Normal file
10
src/app/entities/api-response.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export interface ApiResponse<T> {
|
||||
success: boolean;
|
||||
data?: T;
|
||||
error?: ApiError;
|
||||
}
|
||||
|
||||
export interface ApiError {
|
||||
code: string;
|
||||
msg?: string;
|
||||
}
|
||||
15
src/app/entities/travel.ts
Normal file
15
src/app/entities/travel.ts
Normal 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
7
src/app/entities/user.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export type UserId = string;
|
||||
|
||||
export interface User {
|
||||
id: UserId;
|
||||
matrixId?: string;
|
||||
name: string;
|
||||
}
|
||||
Reference in New Issue
Block a user