1 2 3 4 5 6 7 8 9 10 11 12 13 14
| 'use strict';
var async = require('async'); var mongodb = require('./mongodb');
var Schema = mongodb.mongoose.Schema;
var playersSchema = new Schema({ id: { type: String, unique: true }, binData: { type: Buffer}, // 存档二进制文件数据 }, { versionKey: false });
// 创建模块 module.exports = mongodb.mongo_connection.model('players', playersSchema, 'players');
|