-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtypes.ts
More file actions
52 lines (45 loc) · 977 Bytes
/
types.ts
File metadata and controls
52 lines (45 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
export type Role = 'CLIENT' | 'HOST';
export interface Space {
id: string;
name: string;
location: string;
size: number; // in square feet
pricePerMonth: number;
description: string;
images: string[];
features: string[];
isAvailable: boolean;
hostId: string;
}
export interface Booking {
id: string;
spaceId: string;
userId: string;
startDate: string;
endDate: string;
totalPrice: number;
paymentIntentId?: string;
paymentStatus?: 'pending' | 'succeeded' | 'failed';
}
export interface Review {
id: string;
spaceId: string;
userId: string;
rating: number;
comment: string;
createdAt: string;
user?: User;
}
export interface User {
id: string;
name: string;
email: string;
role: Role;
}
export interface Profile {
id: string;
name: string;
role: Role;
createdAt: string;
}
export type Page = 'home' | 'spaces' | 'spaceDetail' | 'dashboard' | 'admin' | 'login' | 'accessDenied' | 'profile' | 'hostProfile';