{"size": 636, "ext": "js", "max_stars_repo_path": "models/Character.js", "max_stars_repo_name": "Balfir/SoulStars", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "models/Character.js", "max_issues_repo_name": "Balfir/SoulStars", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "models/Character.js", "max_forks_repo_name": "Balfir/SoulStars", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.44, "max_line_length": 66, "alphanum_fraction": 0.6289308176}
/* 
* @Author: Vinxce
* @Date:   2015-10-28 08:30:33
* @Last Modified by:   Vinxce
* @Last Modified time: 2015-10-28 09:24:38
*/

var mongoose = require('mongoose');
var Schema = mongoose.Schema;

var Account = require("./Account");

var Character = new Schema({
    owner: [{type: Schema.Types.ObjectId, ref: 'Account'}]
    name: {type: String, required: true, index: { unique: true}},
    position: {
    	x: Number,
    	y: Number,
    	mapName: String //[{type: Schema.Types.ObjectId, ref: 'Map'}]
    }
    inventory: [] //[{type: Schema.Types.ObjectId, ref: 'Item'}]
});


module.exports = mongoose.model('Character', Character);