0.0.3 • Published 3 years ago

modelsnpm1 v0.0.3

Weekly downloads
142
License
ISC
Repository
-
Last release
3 years ago

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:

1) Import the package from npm : npm i @leadercodes/modelsnpm

2) You may remove the mongoose connection that you have in your index file. 3) 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');

4) Remove the refrences to your local Schemas 5) 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