Skip to content

Commit d352339

Browse files
committed
added docs
1 parent 9d5ee43 commit d352339

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

docs/attendance.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,35 @@ struct AttendanceSummary {
3030
}
3131
```
3232

33+
### Daily Count
34+
Total Lab count for each date
35+
```rust
36+
pub struct DailyCount {
37+
pub date: String,
38+
pub count: i64,
39+
}
40+
```
41+
42+
### Member Summary
43+
Total lab members attended in the past 6 months
44+
```rust
45+
pub struct MemberAttendanceSummary {
46+
pub id: i32,
47+
pub name: String,
48+
pub present_days: i64,
49+
}
50+
```
51+
52+
### Attendance Report
53+
Attendance report of the club members
54+
```rust
55+
pub struct AttendanceReport {
56+
pub daily_count: Vec<DailyCount>,
57+
pub member_attendance: Vec<MemberAttendanceSummary>,
58+
pub max_days: i64,
59+
}
60+
```
61+
3362
## Queries
3463

3564
### Get Attendance
@@ -64,6 +93,25 @@ query {
6493
}
6594
```
6695

96+
### Get Attendance Report
97+
Get Attendance report containing lab count and members attendance report of the past 6 months.
98+
`maxDays returns the count of days when lab was open in the past 6 months`
99+
```graphql
100+
query{
101+
getAttendanceSummary(startDate:"2024-12-20", endDate: "2024-12-27"){
102+
memberAttendance{
103+
name,
104+
presentDays
105+
}
106+
dailyCount{
107+
date,
108+
count
109+
}
110+
maxDays
111+
}
112+
}
113+
```
114+
67115
### Mark Attendance
68116
Record a member's attendance for the day.
69117

0 commit comments

Comments
 (0)