Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kublermdk/24aef870a2bbac126dd8ea25ebcc6fe6 to your computer and use it in GitHub Desktop.
Save kublermdk/24aef870a2bbac126dd8ea25ebcc6fe6 to your computer and use it in GitHub Desktop.
An example of a Customer and Customer Transaction for the article "Advanced Filtering with MongoDB Aggregation Pipelines"
{
"customer": {
"_id": "5eb3d000af2f5c073c089cd2", // ObjectId
"name": "Michael Kubler",
"dateOfBirth": 467683200, // Unix time
"state": "SA",
"gender": "male",
"status": "active",
"createdAt": 1588760101, // Unix time
"updatedAt": 1588760914 // Unix time
},
"customerTransaction": {
"_id": "5d63d183af2f5c0777089f01", // ObjectId
"transactionDate": 1588760915, // Unix time
"storeId": "5e6111bcaf2f5c1d9f7f88fb", // ObjectId
"customerId": "5eb3d000af2f5c073c089cd2", // ObjectId
"products": [
"5e79a458af2f5c1f95415065", // ObjectId
"5e79a458af2f5c1f9541507a" // ObjectId
],
"productCategories": [
"5e79a458af2f5c1f95415062", // ObjectId
"5e79a458af2f5c1f9541506b" // ObjectId
],
"createdAt": 1588760915, // Unix time
"updatedAt": 1588760915 // Unix time
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment