-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtypes.js
10 lines (7 loc) · 899 Bytes
/
types.js
1
2
3
4
5
6
7
8
9
10
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
exports.User = mongoose.model('User', Schema({username: String, firstname: String, lastname: String, email: String, password: String, description: String, profile_icon: String, languages: Array}));
// Category: name: Name of category, shortened: the shortened version of the category, language: the language of the category, username: the username who owns this category, words: number of words
exports.Category = mongoose.model('Category', Schema({name: String, shortened: String, language: String, username: String, words: Number, pinned: Boolean}));
exports.Word = mongoose.model('Word', Schema({ word: String, username: String, language: String, translations: Array, category: String, starred: Boolean }));
exports.Language = mongoose.model('Language', Schema({language: String, shortened: String, hello: String}));