This commit is contained in:
root
2019-11-28 20:40:02 +00:00
commit 1c78566f5b
2275 changed files with 272351 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
const mongoose = require('mongoose'),
animalModel = new mongoose.Schema({
id: mongoose.Schema.Types.ObjectId,
uuid: mongoose.Schema.Types.String,
photo: mongoose.Schema.Types.String,
user: {type: mongoose.Schema.Types.ObjectId, ref: 'user'},
inital_level: mongoose.Schema.Types.Number,
level: mongoose.Schema.Types.Number,
description: mongoose.Schema.Types.String,
initial_health: mongoose.Schema.Types.Decimal128,
initial_energy: mongoose.Schema.Types.Decimal128,
initial_oxigen: mongoose.Schema.Types.Decimal128,
initial_food: mongoose.Schema.Types.Decimal128,
intital_damage: mongoose.Schema.Types.Decimal128,
initial_velocity: mongoose.Schema.Types.Decimal128,
health: mongoose.Schema.Types.Decimal128,
energy: mongoose.Schema.Types.Decimal128,
oxigen: mongoose.Schema.Types.Decimal128,
food: mongoose.Schema.Types.Decimal128,
damage: mongoose.Schema.Types.Decimal128,
velocity: mongoose.Schema.Types.Decimal128,
inconsistency: mongoose.Schema.Types.Decimal128,
imprint: mongoose.Schema.Types.Decimal128,
father: {type: mongoose.Schema.Types.ObjectId, ref: 'user'},
mother: {type: mongoose.Schema.Types.ObjectId, ref: 'user'},
mutation: mongoose.Schema.Types.Decimal128
})
module.exports = db => db.model('animal', animalModel)
+8
View File
@@ -0,0 +1,8 @@
const mongoose = require('mongoose'),
speciesModel = new mongoose.Schema({
id: mongoose.Schema.Types.ObjectId,
name: mongoose.Schema.Types.String,
descripotion: mongoose.Schema.Types.String
})
module.exports = db => db.model('species', speciesModel)
+8
View File
@@ -0,0 +1,8 @@
const mongoose = require('mongoose'),
userModel = new mongoose.Schema({
id: mongoose.Schema.Types.ObjectId,
nick: mongoose.Schema.Types.String,
password: mongoose.Schema.Types.String
})
module.exports = db => db.model('user', userModel)