framez-server/Server/Schemas/User.js

12 lines
404 B
JavaScript

const mongoose = require('mongoose');
const Config = require('../Config/Config')
const Schema = mongoose.Schema;
const User = new Schema({
account_id: Schema.ObjectId,
nickname: { type: String, required: true, index: { unique: true } },
avatar: { type: String, default: Config.defaults.user.avatar },
auth_token: {type: String, default: null}
});
module.exports = mongoose.model('User', User);