Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
729 B
3
Indexable
Never
MODELS
//client.js

const {model, Schema} = require('mongoose')
var schema = new Schema({
      
email:{
    type:String,
    parse:true
},
clientName:{
    type:String,
    parse:true
}})

module.exports= model('client',schema) ;


//list.js

const {model, Schema} = require('mongoose')
var schema = new Schema({
   
clientName:{
    type:String,
    parse:true
},
address:{
    type:String,
    parse:true
}
});

module.exports= model('list',schema) ;

//user.js

const {model, Schema} = require('mongoose')
var schema = new Schema({
    email:{
        type:String,
        parse:true
    },
name:{
    type:String,
    parse:true
},
pass:{
    type:String,
    parse:true
}
});

module.exports= model('user',schema) ;