@leadercodes/modelsnpm
v3.2.8
Published
**This package includes leader db schema models. **
Downloads
15
Keywords
Readme
**This package includes leader db schema models. **
if you want to use the models in your project, you need to follow the below steps:
Login to npm with account of leader: 1.Write in the terminal : npm login userName: password: e-mail:
Import the package from npm : npm i @leadercodes/modelsnpm
You may remove the mongoose connection that you have in your index file.
On the top of the controller file, add these lines:
const mongoose = require("mongoose");
common = require('@leadercodes/modelsnpm');
common.init(mongoose);
const commonmodels = require('@leadercodes/modelsnpm');
- Remove the refrences to your local Schemas
- To actually use the schema, use: new commonmodels.models.{schemaName}
Documentation of the schemas (https://docs.google.com/document/d/1qRyFVXkGQVw3zGuoPrSG_hHCTCVmk6uviq5rwK6uWNE/edit)
the schemas existing in the package: 1.Chat 2.company 3.contact 4.contactGoogle 5.conversation 6.course 7.customer 8.file 9.hour 10.invoice 11.lesson 12.lmsReview 13.lmsTeacher 14.lmsUser 15.product 16.school 17.signature 18.superAdminUser 19.systemWave 20.tag 21.team 22.user 23.wava 24.workspace answer article buisness calendarSettings card category departments event hangout helpCategory notification organization project question task teacher test ticket