framez-server/Server/Schemas/User.js

12 lines
389 B
JavaScript
Raw Permalink Normal View History

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