add spaces

This commit is contained in:
xds
2025-02-17 17:58:07 +03:00
parent a5b334f6c2
commit d680345a9f
23 changed files with 1097 additions and 285 deletions

View File

@@ -0,0 +1,52 @@
[
{
"$lookup": {
"from": "categories",
"localField": "category.$id",
"foreignField": "_id",
"as": "categoryDetails"
}
},
{
"$lookup": {
"from": "spaces",
"localField": "space.$id",
"foreignField": "_id",
"as": "spaceDetails"
}
},
{
"$lookup": {
"from": "users",
"localField": "user.$id",
"foreignField": "_id",
"as": "userDetails"
}
},
{
"$match": {
"$and": [
{
"spaceDetails._id": {
"$oid": "67af52e8b0aa7b0f7f74b491"
}
},
{
"type.code": "INSTANT"
}
]
}
},
{
"$sort": {
"date": -1,
"createdAt": -1
}
},
{
"$skip": 0
},
{
"$limit": 10
}
]