-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodel.js
More file actions
30 lines (27 loc) · 754 Bytes
/
model.js
File metadata and controls
30 lines (27 loc) · 754 Bytes
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
29
30
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
module.exports = mongoose.model('Usuario', new Schema({
Correo: String,
Contrasena: String,
NivelPermiso: {type: String, enum : ['Administrador', 'Editor']},
EstadoUsuario: Boolean
}));
module.exports = mongoose.model('Persona', new Schema({
Nombres: String,
Apellidos: String,
Correo: String,
CorreoPublico: String,
PerfilBlog: String,
SitioWeb: String,
RedesSociales: Array
}));
module.exports = mongoose.model('Blog', new Schema ({
TituloPublicacion: String,
FechaHoraPublicacion: Date,
NombreEditor: String,
ApellidoEditor: String,
CorreoEditor: String,
Publicacion: String,
EstadoPublicacion: Boolean,
TagPublicacion: Array
}));