feat: add adminNotes and registered class counts for users
Expose nationalId aliases and enrollment counts on user list responses, and store admin notes on users, classes, and sessions.
This commit is contained in:
@@ -19,6 +19,7 @@ const getAll = async (query) => {
|
||||
|
||||
const [items, total] = await Promise.all([
|
||||
Class.find(filter)
|
||||
.select('name course professor students capacity tuitionFee startDate endDate isActive adminNotes createdAt updatedAt')
|
||||
.populate({ path: 'course', select: 'title type price' })
|
||||
.populate({ path: 'professor', select: 'name surname' })
|
||||
.skip(skip).limit(limit).sort({ createdAt: -1 }).lean(),
|
||||
|
||||
Reference in New Issue
Block a user