Skip to content

Commit

Permalink
updated docs.md to add the new query and model
Browse files Browse the repository at this point in the history
  • Loading branch information
sabarixr committed Feb 27, 2025
1 parent c1f3d8d commit f8613ca
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions docs/attendance.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,35 @@ struct AttendanceSummary {
}
```

### Daily Count
Total Lab count for each date
```rust
pub struct DailyCount {
pub date: String,
pub count: i64,
}
```

### Member Summary
Total lab members attended in the past 6 months
```rust
pub struct MemberAttendanceSummary {
pub id: i32,
pub name: String,
pub present_days: i64,
}
```

### Attendance Report
Attendance report of the club members
```rust
pub struct AttendanceReport {
pub daily_count: Vec<DailyCount>,
pub member_attendance: Vec<MemberAttendanceSummary>,
pub max_days: i64,
}
```

## Queries

### Mark Attendance
Expand Down Expand Up @@ -66,6 +95,26 @@ query {
}
```

### Get Attendance Report
Get Attendance report containing lab count and members attendance report of the past 6 months.
`maxDays returns the count of days when lab was open in the past 6 months`
```graphql
query{
getAttendanceSummary(startDate:"2024-12-20", endDate: "2024-12-27"){
memberAttendance{
name,
presentDays
}
dailyCount{
date,
count
}
maxDays
}
}
```


## Daily Task

The `src/daily_task/daily_task.rs` system automatically updates attendance summaries at midnight.

0 comments on commit f8613ca

Please sign in to comment.