{"_id":"@linhx/nest-repo-mongodb","_rev":"39-758c0c0a12438d23ed5c9f44adbf59ab","name":"@linhx/nest-repo-mongodb","dist-tags":{"latest":"1.0.0-beta.6"},"versions":{"0.0.18":{"name":"@linhx/nest-repo-mongodb","version":"0.0.18","description":"Achieve abstraction in repository pattern (NestJs)","main":"lib/index.js","scripts":{"build":"tsc"},"repository":{"type":"git","url":"git+https://github.com/linhx/nest-repo-mongodb.git"},"author":{"name":"linhx"},"license":"MIT","bugs":{"url":"https://github.com/linhx/nest-repo-mongodb/issues"},"homepage":"https://github.com/linhx/nest-repo-mongodb#readme","dependencies":{"@linhx/rest-common":"^0.0.4"},"peerDependencies":{"@linhx/nest-repo":"^0.0.6","@nestjs/common":"^8.0.0 || ^9.0.0","@nestjs/mongoose":"^9.2.0","mongoose":"^6.5.4"},"devDependencies":{"typescript":"^4.8.2"},"types":"./lib/index.d.ts","gitHead":"2ea8f5a754fcf0d1beeee042cbc59967e340565e","_id":"@linhx/nest-repo-mongodb@0.0.18","_nodeVersion":"16.16.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-+nZWZ6WDcrkpzTQxQq/6Jx3fRmLg3reePC/gHIWpyMIVlQicbbwC315bN7RSNXTEGBrEGMa/yUKs99RkwcZvbQ==","shasum":"35b3f35b6a275fb1d216e5c3c03d831f8f74ee75","tarball":"https://registry.npmjs.org/@linhx/nest-repo-mongodb/-/nest-repo-mongodb-0.0.18.tgz","fileCount":22,"unpackedSize":133090,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGd3LjK0ZYg4XotUL00N5zii1jLNiEX9uwq50mkxkdR5AiEA4Gz6k1lVQKdRooZRVSLYsRfq268IfKmaQOqa0a1knSc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkKwrWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqEhw//fDjdzrvjS6uJDoIovgf0OadNDRF4K3F4AbHjCTBHcHzKaprV\r\nV8I6+b4ghXf2LfwbkjXSsDFy/qCtrJvaqaAg8iaMCvRlK54BTrXI5PDI7e2l\r\nqo6mR/tIOA1+a1uBjZ8ikYTeWVmiTtiHQT9ZzK1rw0OcHd23jJPJY8nTsABz\r\nkbM0ChLQ3MJeeJYnjNZkhFcdrORuDW7tzlCuVgPtkE97Qy0Z95tVYOaECya+\r\n+N5VqEN9cRuotqcXr+gB6jxYQAp0plvnEGWk4YuEELptKGCzzCQvHsMkvupb\r\nx0seG3cLiSKtf8BN+gRNnk7XbHES+WwtaW/qNhrRyRI/zNELED0IWUQBPrxb\r\no1TdDrWZYkS2IQzVCw7jGBs1nlCDrCg0nu5pVvYdi5xQ9ZZ1nRVLXs2TMoJw\r\nwYeENtzR0sKyXEqrAQgUi52mh45UYjHSB3Rx5qFVzzK7f0BMSUAEOk/mQ6ZY\r\nv7pltnNR+4PUlevAz0Ak4Nw18a8CJn4SydIojDn3prYqrpA6G3JW0hGvjPlA\r\ntq7r0ydQiNmN/7AKLYmAYPSMhGpGG03ubt8ZztwDlP+eXOLle/jH/+OobjJT\r\ntapnhn3w2HhpNLrjjrI/8YuvzA/32D2Kr8lddfvY4haz2ZFN8xXKKHUj8G5S\r\nMPngczA0TCfkZW9+5d08jswPPuscWjd8neQ=\r\n=IVGk\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"linhx","email":"nguyendinhlinhx@gmail.com"},"directories":{},"maintainers":[{"name":"linhx","email":"nguyendinhlinhx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nest-repo-mongodb_0.0.18_1680542421844_0.7924534392893838"},"_hasShrinkwrap":false},"1.0.0-beta.0":{"name":"@linhx/nest-repo-mongodb","version":"1.0.0-beta.0","description":"Achieve abstraction in repository pattern (NestJs)","main":"lib/index.js","scripts":{"build":"tsc","publ":"npm i && npm run build && npm publish --access public"},"repository":{"type":"git","url":"git+https://github.com/linhx/nest-repo-mongodb.git"},"author":{"name":"linhx"},"license":"MIT","bugs":{"url":"https://github.com/linhx/nest-repo-mongodb/issues"},"homepage":"https://github.com/linhx/nest-repo-mongodb#readme","dependencies":{"@linhx/rest-common":"^0.0.4"},"peerDependencies":{"@linhx/nest-repo":"^2.0.0-beta.2","@nestjs/common":"^8.0.0 || ^9.0.0","@nestjs/mongoose":"^9.2.0","mongoose":"^6.5.4"},"devDependencies":{"typescript":"^4.8.2"},"types":"./lib/index.d.ts","gitHead":"a4bb7cbd2be91789e8d6cf02f35549512d041071","_id":"@linhx/nest-repo-mongodb@1.0.0-beta.0","_nodeVersion":"16.16.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-n95lU5oPxGvKMEvEe8v7gwVe4Wcd+iojl3wChdMccN4Htqibm6g5R8sDHwNiWW791oQiGLKeLVW9x/hyqQzqCA==","shasum":"55ffc419d4c0da8c574c9a979ac0644f9dbbac7d","tarball":"https://registry.npmjs.org/@linhx/nest-repo-mongodb/-/nest-repo-mongodb-1.0.0-beta.0.tgz","fileCount":22,"unpackedSize":133013,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUepVGhwGllp+4EuwV3ULcT9jdYGCxj+QTkNxxNRVa6gIgQscw6cCUrfpzNzbMfUMgqJex89qV/AZZ9MlxHK+yW7A="}]},"_npmUser":{"name":"linhx","email":"nguyendinhlinhx@gmail.com"},"directories":{},"maintainers":[{"name":"linhx","email":"nguyendinhlinhx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nest-repo-mongodb_1.0.0-beta.0_1683646330963_0.5385398530120393"},"_hasShrinkwrap":false},"1.0.0-beta.1":{"name":"@linhx/nest-repo-mongodb","version":"1.0.0-beta.1","description":"Achieve abstraction in repository pattern (NestJs)","main":"lib/index.js","scripts":{"build":"tsc","publ":"npm i && npm run build && npm publish --access public"},"repository":{"type":"git","url":"git+https://github.com/linhx/nest-repo-mongodb.git"},"author":{"name":"linhx"},"license":"MIT","bugs":{"url":"https://github.com/linhx/nest-repo-mongodb/issues"},"homepage":"https://github.com/linhx/nest-repo-mongodb#readme","dependencies":{"@linhx/rest-common":"^0.0.4"},"peerDependencies":{"@linhx/nest-repo":"^2.0.0-beta.3","@nestjs/common":"^8.0.0 || ^9.0.0","@nestjs/mongoose":"^9.2.0","mongoose":"^6.5.4"},"devDependencies":{"typescript":"^4.8.2"},"types":"./lib/index.d.ts","gitHead":"ea5da91eab9084da0c8e78fe053015bf064efd77","_id":"@linhx/nest-repo-mongodb@1.0.0-beta.1","_nodeVersion":"16.16.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-BJhDsda9kPvQpWK2fI30Nu/MOrz0F4569oETFvj1atoWUdq11TusjPH9oNfD4MQy12jiKKDN0X9AXyexgKk0JA==","shasum":"390caf2fd96d9b456327382627d62f35d1cdd340","tarball":"https://registry.npmjs.org/@linhx/nest-repo-mongodb/-/nest-repo-mongodb-1.0.0-beta.1.tgz","fileCount":22,"unpackedSize":133013,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFSIOoLJTCgpUm2N3d7drClumHBu3uA3+plrDDCz5JXdAiATmRjfSEjpZpb5urlXwtVW+g8JNF7YdGweEAeqtPGXqA=="}]},"_npmUser":{"name":"linhx","email":"nguyendinhlinhx@gmail.com"},"directories":{},"maintainers":[{"name":"linhx","email":"nguyendinhlinhx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nest-repo-mongodb_1.0.0-beta.1_1684767429622_0.8697208848203206"},"_hasShrinkwrap":false},"1.0.0-beta.2":{"name":"@linhx/nest-repo-mongodb","version":"1.0.0-beta.2","description":"Achieve abstraction in repository pattern (NestJs)","main":"lib/index.js","scripts":{"build":"tsc","publ":"npm i && npm run build && npm publish --access public"},"repository":{"type":"git","url":"git+https://github.com/linhx/nest-repo-mongodb.git"},"author":{"name":"linhx"},"license":"MIT","bugs":{"url":"https://github.com/linhx/nest-repo-mongodb/issues"},"homepage":"https://github.com/linhx/nest-repo-mongodb#readme","dependencies":{"@linhx/rest-common":"^0.0.4"},"peerDependencies":{"@linhx/nest-repo":"^2.0.0-beta.5","@nestjs/common":"^8.0.0 || ^9.0.0","@nestjs/mongoose":"^9.2.0","mongoose":"^6.5.4"},"devDependencies":{"typescript":"^4.8.2"},"types":"./lib/index.d.ts","gitHead":"ea5da91eab9084da0c8e78fe053015bf064efd77","_id":"@linhx/nest-repo-mongodb@1.0.0-beta.2","_nodeVersion":"16.16.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-RL9ajj2Vxv6mr59zHeubvq2TIYGPodFpGOALE6bA4wAQTZpDrdWuiqlFP/HkZYHbBwqJT40Xaw/KvJn1ZoLxfA==","shasum":"dcaa41cfb084bd4a1c2d5683ddb0f900f963556e","tarball":"https://registry.npmjs.org/@linhx/nest-repo-mongodb/-/nest-repo-mongodb-1.0.0-beta.2.tgz","fileCount":22,"unpackedSize":133661,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCd2EOKEFLDSONqwqzpnHdOXCK4Akpj+YOnOzapzGvukgIgb71hv+E7pJmXAOyMJtJOF63YWmj6ECHg0asyrL0JIs4="}]},"_npmUser":{"name":"linhx","email":"nguyendinhlinhx@gmail.com"},"directories":{},"maintainers":[{"name":"linhx","email":"nguyendinhlinhx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nest-repo-mongodb_1.0.0-beta.2_1685033245742_0.8613104851748326"},"_hasShrinkwrap":false},"1.0.0-beta.3":{"name":"@linhx/nest-repo-mongodb","version":"1.0.0-beta.3","description":"Achieve abstraction in repository pattern (NestJs)","main":"lib/index.js","scripts":{"build":"tsc","publ":"npm i && npm run build && npm publish --access public"},"repository":{"type":"git","url":"git+https://github.com/linhx/nest-repo-mongodb.git"},"author":{"name":"linhx"},"license":"MIT","bugs":{"url":"https://github.com/linhx/nest-repo-mongodb/issues"},"homepage":"https://github.com/linhx/nest-repo-mongodb#readme","dependencies":{"@linhx/rest-common":"^0.0.4"},"peerDependencies":{"@linhx/nest-repo":"^2.0.0-beta.6","@nestjs/common":"^8.0.0 || ^9.0.0","@nestjs/mongoose":"^9.2.0","mongoose":"^6.5.4"},"devDependencies":{"typescript":"^4.8.2"},"types":"./lib/index.d.ts","gitHead":"529965ca4627d5f8914792708bb211a3d1f72ca4","_id":"@linhx/nest-repo-mongodb@1.0.0-beta.3","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-6ZUESw4oLeoPCVfrJl0gTGKTBMR3PvYNBExyAr2O+Tp26x4ETiBNSpTB911rPxpwW4RqBkvgy70Z/Zn3bje4NA==","shasum":"77ccbfea1d83d4bb007e76f9e1ccfadf0931274c","tarball":"https://registry.npmjs.org/@linhx/nest-repo-mongodb/-/nest-repo-mongodb-1.0.0-beta.3.tgz","fileCount":22,"unpackedSize":136840,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEzA2k9mng/B4WEVf0CiaXM6jYABYqIBGEYkQSG211oyAiBDASem2rmDHwpxpKxvmTj0qVSqFJpQEdwFpSOfxOQcxQ=="}]},"_npmUser":{"name":"linhx","email":"nguyendinhlinhx@gmail.com"},"directories":{},"maintainers":[{"name":"linhx","email":"nguyendinhlinhx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nest-repo-mongodb_1.0.0-beta.3_1686069811026_0.7955072701205421"},"_hasShrinkwrap":false},"1.0.0-beta.4":{"name":"@linhx/nest-repo-mongodb","version":"1.0.0-beta.4","description":"Achieve abstraction in repository pattern (NestJs)","main":"lib/index.js","scripts":{"build":"tsc","publ":"npm i && npm run build && npm publish --access public"},"repository":{"type":"git","url":"git+https://github.com/linhx/nest-repo-mongodb.git"},"author":{"name":"linhx"},"license":"MIT","bugs":{"url":"https://github.com/linhx/nest-repo-mongodb/issues"},"homepage":"https://github.com/linhx/nest-repo-mongodb#readme","dependencies":{"@linhx/rest-common":"^0.0.4"},"peerDependencies":{"@linhx/nest-repo":"^2.0.0-beta.10","@nestjs/common":"^8.0.0 || ^9.0.0","@nestjs/mongoose":"^9.2.0","mongoose":"^6.5.4"},"devDependencies":{"typescript":"^4.8.2"},"types":"./lib/index.d.ts","gitHead":"529965ca4627d5f8914792708bb211a3d1f72ca4","_id":"@linhx/nest-repo-mongodb@1.0.0-beta.4","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-r5mtPbtnoTnGpRAGTtyqilw06l8Zt9IDIDby5/l+EKrdVDPuiQQXYNfawSQG8FxSUr7dpRHkgwW0IFXhsYqCow==","shasum":"0c658fb252e8570370280557f5c2efc7d7674e7d","tarball":"https://registry.npmjs.org/@linhx/nest-repo-mongodb/-/nest-repo-mongodb-1.0.0-beta.4.tgz","fileCount":22,"unpackedSize":137189,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID/FOvuyKoIemcOyUm2LjRocAU8BnZ78pdqKcSV7k7F8AiEAwwsSvfOjQM+u6SfroWwM9irMKFfDRUcbqDyy5qKQGqo="}]},"_npmUser":{"name":"linhx","email":"nguyendinhlinhx@gmail.com"},"directories":{},"maintainers":[{"name":"linhx","email":"nguyendinhlinhx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nest-repo-mongodb_1.0.0-beta.4_1686071782314_0.007757844570061456"},"_hasShrinkwrap":false},"1.0.0-beta.5":{"name":"@linhx/nest-repo-mongodb","version":"1.0.0-beta.5","description":"Achieve abstraction in repository pattern (NestJs)","main":"lib/index.js","scripts":{"build":"tsc","publ":"npm i && npm run build && npm publish --access public"},"repository":{"type":"git","url":"git+https://github.com/linhx/nest-repo-mongodb.git"},"author":{"name":"linhx"},"license":"MIT","bugs":{"url":"https://github.com/linhx/nest-repo-mongodb/issues"},"homepage":"https://github.com/linhx/nest-repo-mongodb#readme","dependencies":{"@linhx/rest-common":"^0.0.4"},"peerDependencies":{"@linhx/nest-repo":"^2.0.0-beta.10","@nestjs/common":"^8.0.0 || ^9.0.0","@nestjs/mongoose":"^9.2.0","mongoose":"^6.5.4"},"devDependencies":{"typescript":"^4.8.2"},"types":"./lib/index.d.ts","gitHead":"dc3728d48e9a2df0deadb0d3513c8350f85723f5","_id":"@linhx/nest-repo-mongodb@1.0.0-beta.5","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-1ypUljxRlY0k2sNHdXdUhIAEB7WM8D6Gw40VSfYDq9XTnbdl1aNQEGKF5M8wQ7UztJPjtdaKWVMVhI0fZdl8BA==","shasum":"512e620788576c870a99573b658e35d400c880ba","tarball":"https://registry.npmjs.org/@linhx/nest-repo-mongodb/-/nest-repo-mongodb-1.0.0-beta.5.tgz","fileCount":22,"unpackedSize":138010,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGElaUcMSbujYfwpEaxVEZNPDGLlK8kb1y2L5KvybBK5AiEA1sFzjoqn8ejWJKueRLfiUtN3Gty/5brNAj5XyTVg1qs="}]},"_npmUser":{"name":"linhx","email":"nguyendinhlinhx@gmail.com"},"directories":{},"maintainers":[{"name":"linhx","email":"nguyendinhlinhx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nest-repo-mongodb_1.0.0-beta.5_1686235785090_0.8495858357656352"},"_hasShrinkwrap":false},"1.0.0-beta.6":{"name":"@linhx/nest-repo-mongodb","version":"1.0.0-beta.6","description":"Achieve abstraction in repository pattern (NestJs)","main":"lib/index.js","scripts":{"build":"tsc","publ":"npm i && npm run build && npm publish --access public"},"repository":{"type":"git","url":"git+https://github.com/linhx/nest-repo-mongodb.git"},"author":{"name":"linhx"},"license":"MIT","bugs":{"url":"https://github.com/linhx/nest-repo-mongodb/issues"},"homepage":"https://github.com/linhx/nest-repo-mongodb#readme","dependencies":{"@linhx/rest-common":"^0.0.4"},"peerDependencies":{"@linhx/nest-repo":"^2.0.0-beta.10","@nestjs/common":"^8.0.0 || ^9.0.0","@nestjs/mongoose":"^9.2.0","mongoose":"^6.5.4"},"devDependencies":{"typescript":"^4.8.2"},"types":"./lib/index.d.ts","gitHead":"dc3728d48e9a2df0deadb0d3513c8350f85723f5","_id":"@linhx/nest-repo-mongodb@1.0.0-beta.6","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-qfJgxbZGKSx91yZpD1bPqvMX+9RipfHeP83yuhx6yM6pibShTjIo/7QpFfFlFO7kpJV6JSTV7R+zOiy7YL/y6w==","shasum":"804fb140de2dd4dc7d9c12ccb857d6e633cbfe80","tarball":"https://registry.npmjs.org/@linhx/nest-repo-mongodb/-/nest-repo-mongodb-1.0.0-beta.6.tgz","fileCount":22,"unpackedSize":138063,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTizPf2f5PIZ3JS4TVwmldrhE6LfZbUrSl5bRl2F8IbAIhAPYUTacU8Hiyd6eEKTd/Slfj7wNTFZoTbMxZUaOf5lQd"}]},"_npmUser":{"name":"linhx","email":"nguyendinhlinhx@gmail.com"},"directories":{},"maintainers":[{"name":"linhx","email":"nguyendinhlinhx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nest-repo-mongodb_1.0.0-beta.6_1686236127634_0.30932829017952446"},"_hasShrinkwrap":false}},"time":{"created":"2022-09-02T15:49:13.843Z","0.0.1":"2022-09-02T15:49:14.153Z","modified":"2023-06-08T14:55:27.974Z","0.0.2":"2022-09-02T16:26:23.608Z","0.0.3":"2022-09-02T16:39:36.188Z","0.0.4":"2022-09-04T17:20:16.158Z","0.0.5":"2022-09-04T17:28:29.692Z","0.0.6":"2022-09-04T17:37:29.240Z","0.0.7":"2022-09-04T17:39:40.929Z","0.0.8":"2022-09-05T06:44:39.971Z","0.0.9":"2022-09-05T07:19:49.987Z","0.0.10":"2022-09-05T08:26:02.290Z","0.0.11":"2023-01-10T16:06:56.501Z","0.0.12":"2023-01-10T16:10:58.677Z","0.0.14":"2023-04-02T16:11:05.054Z","0.0.15":"2023-04-03T17:10:42.393Z","0.0.16":"2023-04-03T17:14:04.352Z","0.0.17":"2023-04-03T17:19:17.377Z","0.0.18":"2023-04-03T17:20:22.170Z","1.0.0-beta.0":"2023-05-09T15:32:11.173Z","1.0.0-beta.1":"2023-05-22T14:57:09.821Z","1.0.0-beta.2":"2023-05-25T16:47:25.938Z","1.0.0-beta.3":"2023-06-06T16:43:31.273Z","1.0.0-beta.4":"2023-06-06T17:16:22.505Z","1.0.0-beta.5":"2023-06-08T14:49:45.346Z","1.0.0-beta.6":"2023-06-08T14:55:27.864Z"},"maintainers":[{"name":"linhx","email":"nguyendinhlinhx@gmail.com"}],"homepage":"https://github.com/linhx/nest-repo-mongodb#readme","repository":{"type":"git","url":"git+https://github.com/linhx/nest-repo-mongodb.git"},"author":{"name":"linhx"},"bugs":{"url":"https://github.com/linhx/nest-repo-mongodb/issues"},"license":"MIT","readme":"# nest-repo-mongodb\n\nAchieve abstraction in repository pattern (NestJs)\n\n## Install\n\n```shell\nnpm i @nestjs/mongoose mongoose\nnpm i @linhx/nest-repo @linhx/nest-repo-mongodb\n```\n\n## Example\n\n1. Import module\n\n```typescript\nimport RepositoryMongodbModule from '@linhx/nest-repo-mongodb';\nimport { Module } from '@nestjs/common';\nimport { MongooseModule } from '@nestjs/mongoose';\nimport { ProductModule } from './product/product.module';\n\n@Module({\n  imports: [\n    MongooseModule.forRoot(process.env.MONGO_DB_URL, {\n      dbName: process.env.MONGO_DB_NAME,\n      replicaSet: process.env.MONGO_DB_REPLICA,\n    }),\n    RepositoryMongodbModule.forRoot(),\n    ProductModule,\n  ],\n})\nexport class AppModule {}\n\n```\n\n2. Interface\n\n```typescript\n// product.repository.ts\n\nimport { Transaction, Repository } from '@linhx/nest-repo';\nimport { ObjectId } from 'mongoose';\nimport { Product } from './entities/product.entity';\n\nexport interface ProductRepository extends Repository<Product, ObjectId> {\n  findByStore(trx: Transaction, storeId: string): Promise<Product[]>;\n}\n\nexport const ProductRepositoryProviderName = 'ProductRepository';\n\n\n```\n\n3. Implementation\n\n```typescript\n// product.repository.impl.ts\n\nimport {\n  ProductRepository,\n  ProductRepositoryProviderName,\n} from './product.repository';\nimport { Product, ProductDocument } from './entities/product.entity';\nimport { ClassProvider, Inject, Injectable } from '@nestjs/common';\nimport { InjectModel } from '@nestjs/mongoose';\nimport { Model } from 'mongoose';\nimport {\n  MongoTransaction,\n  DbMongo,\n  RepositoryImpl,\n} from '@linhx/nest-repo-mongodb';\nimport { DB_PROVIDER } from '@linhx/nest-repo';\n\n@Injectable()\nexport class ProductRepositoryImpl\n  extends RepositoryImpl<Product>\n  implements ProductRepository\n{\n  constructor(\n    @Inject(DB_PROVIDER) private readonly db: DbMongo,\n    @InjectModel(Product.name) private productModel: Model<ProductDocument>,\n  ) {\n    super(db, productModel);\n  }\n\n  findByStore(trx: MongoTransaction, storeId: string): Promise<Product[]> {\n    return this.findAll(trx, {\n      storeId,\n    });\n  }\n}\n\nexport const ProductRepositoryProvider: ClassProvider = {\n  provide: ProductRepositoryProviderName,\n  useClass: ProductRepositoryImpl,\n};\n```\n","readmeFilename":"README.md","description":"Achieve abstraction in repository pattern (NestJs)"}