initial
This commit is contained in:
@@ -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)
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user