I have two models
in my bd
user.js
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var bcrypt = require('bcrypt');
// User Model
var UserSchema = new Schema({
name: {
type: String,
unique: true,
required: true
},
password: {
type: String,
required: true
}
});
UserSchema.add({
email: 'string',
about: 'string',
age: 'number',
active: 'Boolean',
phone: 'number'
});
and actions.js
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var bcrypt = require('bcrypt');
var ActionSchema = new Schema({
postPerm: 'Boolean',
sendEmailPerm: 'Boolean',
editPerm: 'Boolean'
});
How do I link to them?
In case I want USER to have a ACTIONS related where I will control them