1 | /**
|
2 | * user.js
|
3 | * Author: Fernando Garcia
|
4 | * Date: 14/03/14
|
5 | */
|
6 |
|
7 | var mongoose = require ("mongoose"),
|
8 | Schema = mongoose.Schema;
|
9 |
|
10 | var userSchema = new Schema (
|
11 | { login: {
|
12 | type: String
|
13 | },
|
14 | name: {
|
15 | type: String,
|
16 |
|
17 | },
|
18 | email: {
|
19 | type: String,
|
20 | },
|
21 |
|
22 | hashed_password: {
|
23 | type: String
|
24 | },
|
25 |
|
26 | salt: {
|
27 | type: String
|
28 | },
|
29 |
|
30 | time:{
|
31 | type: Date,
|
32 | defaultValue: 0
|
33 | }
|
34 |
|
35 |
|
36 | });
|
37 |
|
38 | module.exports = mongoose.model('user', userSchema); |
\ | No newline at end of file |