Commit cd5e469c authored by Guilherme Luz da Silva's avatar Guilherme Luz da Silva
Browse files

Revert "feat: Added database schemas"

This reverts commit 087b820f.
parent 087b820f
Showing with 0 additions and 62 deletions
+0 -62
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
import * as mongoose from 'mongoose';
const CulturesSchema = new schema({
plant: {
type: mongoose.Schema.Types.ObjectId,
ref: "Plants"
},
coordinates: [
{x: { type: Number }},
{y: { type: Number }}
]
});
export const Cultures = mongoose.model("Cultures", CulturesSchema);
\ No newline at end of file
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
import * as mongoose from 'mongoose';
const PlantationSchema = new schema({
hive_id: { type: String, required: true },
distance_x: { type: Number, required: true },
distance_y: { type: Number, required: true },
cultures: [{
type: mongoose.Schema.Types.ObjectId,
ref: "Cultures"
}]
});
export const Plantation = mongoose.model("Plantation", PlantationSchema);
\ No newline at end of file
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
import * as mongoose from 'mongoose';
const CulturaSchema = new schema({
plant: { type: String, required: true },
water_amt: { type: Number, default: "5" },
agrotoxic_amt: { type: Number, default: "3" },
water_time: { type: String, default: "07:00" },
agrotoxic_time: { type: String, default: "08:00" },
});
export const Plants = mongoose.model("Plants", PlantsSchema);
\ No newline at end of file
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
import * as mongoose from 'mongoose';
const UsersSchema = new schema({
password: { type: String, required: true },
access_lvl: { type: Number, required: true }
});
export const Users = mongoose.model("Users", UsersSchema);
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment