mirror of
https://github.com/arnaucube/thoughts.git
synced 2026-02-06 19:26:47 +01:00
primer commit, server comença a funcionar
This commit is contained in:
10
models/thoughtModel.js
Normal file
10
models/thoughtModel.js
Normal file
@@ -0,0 +1,10 @@
|
||||
var mongoose = require('mongoose'),
|
||||
Schema = mongoose.Schema;
|
||||
|
||||
|
||||
var thoughtSchema = new Schema({
|
||||
time: { type: String },
|
||||
content: { type: String },
|
||||
authorname: { type: String }
|
||||
})
|
||||
module.exports = mongoose.model('thoughtModel', thoughtSchema);
|
||||
22
models/userModel.js
Normal file
22
models/userModel.js
Normal file
@@ -0,0 +1,22 @@
|
||||
var mongoose = require('mongoose'),
|
||||
Schema = mongoose.Schema;
|
||||
|
||||
/*var tvshowSchema = new Schema({
|
||||
title: { type: String },
|
||||
year: { type: Number },
|
||||
country: { type: String },
|
||||
poster: { type: String },
|
||||
seasons: { type: Number },
|
||||
genre: { type: String, enum:
|
||||
['Drama', 'Fantasy', 'Sci-Fi', 'Thriller', 'Comedy']
|
||||
},
|
||||
summary: { type: String }
|
||||
});*/
|
||||
|
||||
var userSchema = new Schema({
|
||||
username: { type: String },
|
||||
description: { type: String },
|
||||
icon: { type: String },
|
||||
mail: { type: String }
|
||||
})
|
||||
module.exports = mongoose.model('userModel', userSchema);
|
||||
Reference in New Issue
Block a user