zhouxiantao
8 days ago 03193b2a27a2c23e10f3a2f298de9c1142116780
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
/**
 * @author 韩天尊
 * @time 2024-01-15
 * @version 1.0.0
 * @description 全局类型定义
 */
 
// API响应接口
export interface ApiResponse<T = any> {
    code: number;
    msg: string;
    data: T;
}
 
// 用户信息接口
export interface User {
    id?: number;
    name: string;
    phone?: string;
    points: number;
    redeemedPoints: number;
    totalPoints: number;
    isVolunteer: boolean;
    isVerified?: boolean;
    community?: string;
    volunteerInfo: any;
    isAdmin?: boolean; // 是否为管理员
}
 
// 参与人信息接口
export interface VolActivityUser {
    checkinTime?: string; // 签到时间
    checkinLocation?: string; // 签到地点
    checkoutTime?: string; // 签退时间
    checkoutLocation?: string; // 签退地点
    earnedPoints?: number; // 获得积分
}
 
// 活动信息接口
export interface Activity {
    id: number;
    title: string;
    time?: string;
    startTime?: string;
    endTime?: string;
    location: string;
    points: number;
    status: 'ongoing' | 'upcoming' | 'completed' | string;
    category: string;
    categoryDesc?: string;
    content: string;
    deadline?: string;
    maxParticipants: number;
    currentParticipants: number;
    img?: string;
    communityName?: string;
    subdistrictName?: string;
    districtName?: string;
    userStatus?: string; // 报名状态 0-未报名,1-已报名,2-已签到,3-已签退
    volActivityUser?: VolActivityUser; // 参与人信息
    fileList?: string[]; // 附件列表
}
 
// 签到记录接口
export interface CheckinRecord {
    id: number;
    activityId: number;
    activityTitle: string;
    checkinTime: string;
    checkinLocation: string;
    checkoutTime?: string;
    checkoutLocation?: string;
    status: string;
    serviceHours?: number;
    earnedPoints?: number;
}
 
// 申报记录接口
export interface DeclarationRecord {
    id: number;
    title?: string;
    category?: string;
    categoryDesc?: string;
    secondary?: string;
    activityName?: string;
    time?: string;
    startTime?: string;
    endTime?: string;
    content?: string;
    points: number;
    status: 'approved' | 'pending' | 'rejected' | string;
    isPositive: boolean;
    serviceHours?: number;
    reviewComment?: string;
    type?: string;
}
 
// 消息接口
export interface Message {
    id: number;
    title: string;
    content: string;
    type: string;
    isRead: boolean;
    relatedId?: number;
    createTime: string;
    readTime?: string;
    time?: string;
}
 
// 积分概览接口
export interface PointsOverview {
    available: number;
    redeemed: number;
    total: number;
}
 
// 社区积分接口
export interface CommunityPoints {
    points: number; // 可用积分
    redeemedPoints: number; // 已核销积分
    totalPoints: number; // 总积分
    communityName: string; // 社区名称
    communityCode?: string; // 社区编码
}
 
// 社区积分概览接口
export interface CommunityPointsOverview {
    communityList: CommunityPoints[];
}
 
// 二维码扫描结果接口
export interface QRCodeScanResult {
    communityCode: string; // 社区编码
    userId: number; // 用户ID
    userName: string; // 用户姓名
    points: number; // 可用积分
}
 
// 志愿者注册表单接口
export interface VolunteerRegisterForm {
    name: string;
    idCard: string;
    phone: string;
}
 
// 核销记录接口
export interface RedemptionRecord {
    id: number;
    points: number;
    description: string;
    redemptionTime: string;
    createTime?: string;
    status: string;
    productName?: string;
    productNum?: number;
}
 
// 管理端统计数据接口
export interface AdminDashboardStats {
    pendingReviews: number;
    pendingVolunteerApplications: number;
    ongoingActivities: number;
    todayCheckins: number;
    monthlyStats: {
        newActivities: number;
        completedActivities: number;
        totalParticipants: number;
        totalServiceHours: number;
    };
}
 
// 管理端活动统计接口
export interface AdminActivityStats {
    totalActivities: number;
    completedActivities: number;
    ongoingActivities: number;
    upcomingActivities: number;
    totalParticipants: number;
    totalServiceHours: number;
}
 
// 管理端积分统计接口
export interface AdminPointsStats {
    totalAwarded: number;
    totalRedeemed: number;
    pendingReviews: number;
    approvedToday: number;
    rejectedToday: number;
}
 
// 管理端活动接口
export interface AdminActivity {
    id: number;
    title: string;
    startTime: string;
    endTime: string;
    location: string;
    participants: number;
    status: string;
    category: string;
    categoryDesc: string;
    img: string;
    maxParticipants: number;
    points: number;
    fileList?: string[]; // 附件列表
}
 
// 管理端活动详情接口
export interface AdminActivityDetail {
    id: number;
    title: string;
    startTime: string;
    endTime: string;
    location: string;
    participants: Array<{
        id: number;
        userName: string;
        userPhone: string;
        status: string; // '报名状态 1-已报名,2-已签到,3-已签退'
        checkinLocation: string;
        checkoutLocation: string;
        checkinTime?: string;
        checkoutTime?: string;
        serviceHours?: number;
    }>;
    status: string;
    category: string;
    categoryDesc: string;
    img: string;
    maxParticipants: number;
    points: number;
    content: string;
    currentParticipants: number;
    deadline: string;
    fileList?: string[]; // 附件列表
}
 
// 管理端积分审核记录接口
export interface AdminPointsReviewRecord {
    id: number;
    userName: string;
    activityTitle: string;
    points: number;
    secondary: string;
    status: string;
    createTime: string;
    category: string;
    categoryDesc: string;
    serviceHours: number;
    expectedPoints: number;
}
 
// 管理端积分审核详情接口
export interface AdminPointsReviewDetail extends AdminPointsReviewRecord {
    phone: string;
    fileList: string[];
    reviewTime?: string;
    reviewComment?: string;
}
 
// 管理端志愿者审核记录接口
export interface AdminVolunteerReviewRecord {
    id: number;
    name: string;
    phone: string;
    idCard: string;
    community: string;
    status: string;
    submitTime: string;
    createTime: string;
}
 
// 管理端志愿者审核详情接口
export interface AdminVolunteerReviewDetail extends AdminVolunteerReviewRecord {
    fileList: string[];
    reviewTime?: string;
    reviewComment?: string;
}
 
// 管理端用户接口
export interface AdminUser {
    id: number;
    name: string;
    phone: string;
    community: string;
    isVolunteer: boolean;
    totalPoints: number;
    availablePoints: number;
    redeemedPoints: number;
    totalServiceHours: number;
    joinTime: string;
}
 
// 管理端用户详情接口
export interface AdminUserDetail extends AdminUser {
    idCard: string;
    activities: Array<{
        id: number;
        title: string;
        joinTime: string;
        serviceHours: number;
        points: number;
    }>;
}
 
// 管理端核销记录接口
export interface AdminRedemptionRecord {
    id: number;
    userName: string;
    points: number;
    productName: string;
    productNum: number;
    description: string;
    redemptionTime: string;
    operator: string;
}
 
// 文件上传响应接口
export interface FileUploadResponse {
    id: string;
    name: string;
    trueName: string;
    suffix: string;
    type: string;
    fileSize: number;
    unit: string;
    showUrl: string;
    downUrl: string;
    zipUrl: string;
    ownerId: string;
    ownerType: number;
    ownerTypeName: string;
    createTime: string;
}