-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtypes.ts
More file actions
98 lines (86 loc) · 2.4 KB
/
types.ts
File metadata and controls
98 lines (86 loc) · 2.4 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
export enum UserRole {
MENTEE = 'MENTEE',
MENTOR = 'MENTOR'
}
export enum BookingStatus {
PENDING = 'PENDING', // Waiting for mentor approval (optional, not used heavily in this demo)
CONFIRMED = 'CONFIRMED', // Scheduled
COMPLETED = 'COMPLETED', // Time passed
CANCELLED = 'CANCELLED'
}
export enum PaymentStatus {
UNPAID = 'UNPAID',
PAID = 'PAID'
}
export interface User {
id: string;
name: string;
email: string;
role: UserRole;
isActivated: boolean; // True if paid 10k
avatarUrl: string;
// Mentor specific
bio?: string;
topics?: string[];
hourlyRate?: number; // Donation amount required
charityAccountNumber?: string; // The 4-digit account (e.g. 2000)
rating?: number; // 0 to 5
reviewCount?: number;
}
export interface AvailabilitySlot {
id: string;
mentorId: string;
startTime: string; // ISO String
endTime: string; // ISO String - New field to define specific end time
isBooked: boolean;
}
export interface Booking {
id: string;
mentorId: string;
menteeId: string;
startTime: string; // ISO String
endTime: string; // ISO String
status: BookingStatus;
paymentStatus: PaymentStatus;
meetLink?: string;
cost: number;
paymentCode: string; // The content syntax for transfer
}
export interface Transaction {
id: string;
transactionTime: string;
amount: number;
description: string;
accountNumber: string;
}
export interface Topic {
id: string;
name: string;
icon: string;
}
// Leaderboard Types
export type TimePeriod = 'day' | 'week' | 'month' | 'quarter' | 'year';
export type RankingMetric = 'donation' | 'sessions';
export interface LeaderboardEntry {
rank: number;
user: {
id: string;
name: string;
avatarUrl: string;
role: UserRole;
};
value: number; // Could be money or count
change?: number; // Rank change (optional for visual flair)
}
export const CHARITY_ACCOUNTS = [
{ code: '2000', name: 'Hoàng Hoa Trung - Dự án Nuôi Em', bank: 'MBBank' },
{ code: '1111', name: 'Quỹ Trò Nghèo Vùng Cao', bank: 'MBBank' }
];
export const AVAILABLE_TOPICS: Topic[] = [
{ id: '1', name: 'Công nghệ thông tin', icon: '💻' },
{ id: '2', name: 'Marketing', icon: '📢' },
{ id: '3', name: 'Kỹ năng mềm', icon: '🤝' },
{ id: '4', name: 'Ngoại ngữ', icon: '🗣️' },
{ id: '5', name: 'Tài chính cá nhân', icon: '💰' },
{ id: '6', name: 'Design / Nghệ thuật', icon: '🎨' },
];