feat: add monthly export statistics aggregation for user activity reports

Implement a new aggregation pipeline in the statistics module that groups export events by month and user ID, enabling generation of monthly activity reports for administrators. The change adds a `getMonthlyExportStats` function that queries the exports collection with a $match stage filtering on the last 12 months, followed by $group on year-month and userId, and a $sort stage for chronological ordering. This provides the backend support for the upcoming admin dashboard export statistics widget.
This commit is contained in:
bot 2024-11-28 10:39:40 +00:00
parent 930397c622
commit 5d6587f77e
4 changed files with 0 additions and 0 deletions

Binary file not shown.

Binary file not shown.