-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
98 lines (90 loc) · 2.32 KB
/
types.ts
File metadata and controls
98 lines (90 loc) · 2.32 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 interface Donor {
id: number;
name: string;
email: string;
phone: string;
donor_type: 'Recurring' | 'One-Time' | 'Major Sponsor';
address: string;
country: string;
joined_date: string; // YYYY-MM-DD
total_donated: number;
}
export interface Donation {
id: number;
donor_id: number;
project_id: number | null; // Can be a general donation
amount: number;
date: string; // YYYY-MM-DD
payment_method: 'Credit Card' | 'PayPal' | 'Bank Transfer';
receipt_url?: string;
}
export interface User {
id: number;
name: string;
email: string;
role: 'Admin' | 'Staff' | 'Volunteer';
phone: string;
joined_date: string; // YYYY-MM-DD
status: 'Active' | 'Inactive';
address: string;
bio: string;
assigned_project_ids: number[];
}
export interface Milestone {
name: string;
completed: boolean;
due_date: string; // YYYY-MM-DD
}
export interface ProjectExpense {
id: number;
description: string;
amount: number;
date: string; // YYYY-MM-DD
}
export interface Project {
id: number;
name: string;
description: string;
status: 'Active' | 'Completed' | 'Pending' | 'On Hold';
start_date: string; // YYYY-MM-DD
end_date: string; // YYYY-MM-DD
budget: number;
total_donations: number;
beneficiaries_helped: number;
location: string;
milestones: Milestone[];
team_members: number[]; // Array of User IDs
project_lead_id: number; // User ID
expenses: ProjectExpense[];
}
export interface BeneficiarySupport {
date: string;
type: 'Financial' | 'Food' | 'Health' | 'Education';
amount?: number;
project_id: number;
}
export interface Beneficiary {
id: number;
name: string;
email: string;
phone: string;
address: string;
joined_date: string; // YYYY-MM-DD
status: 'Active' | 'Inactive';
project_ids: number[]; // Projects they are part of
age: number;
gender: 'Male' | 'Female' | 'Other' | 'Prefer not to say';
household_size: number;
notes: string;
support_history: BeneficiarySupport[];
}
export interface Event {
id: number;
title: string;
description: string;
date: string; // YYYY-MM-DD
location: string;
budget: number;
project_id: number | null; // Can be a general event
participants: number;
}