blob: 486ef5d9ebbd4b751dae6d09083fa061b771d8b5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/**
* Module dependencies
*/
var mongoose = require('mongoose')
, Schema = mongoose.Schema;
var AccessSchema = new Schema({
user: { type: String, ref: 'User' },
creator: { type: String, ref: 'User' },
project: { type: String, ref: 'Project' },
permissions: { type: Number, default: '3' },
created: { type: Date, default: Date.now },
updated: { type: Date, default: Date.now }
});
// the four validations below only apply if you are signing up traditionally
ProjectSchema.methods = {
log: function() {
console.log('wat. wat logged this');
}
}
mongoose.model('Access', AccessSchema);
|