Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Flor-De-Lotus
api
Commits
cd5e469c
Commit
cd5e469c
authored
5 years ago
by
Guilherme Luz da Silva
Browse files
Options
Download
Email Patches
Plain Diff
Revert "feat: Added database schemas"
This reverts commit
087b820f
.
parent
087b820f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/cultures.schema/cultures.schema.js
+0
-17
src/cultures.schema/cultures.schema.js
src/plantation.schema/plantation.schema.js
+0
-17
src/plantation.schema/plantation.schema.js
src/plants.schema/plants.schema.js
+0
-16
src/plants.schema/plants.schema.js
src/users.schema/users.schema.js
+0
-12
src/users.schema/users.schema.js
with
0 additions
and
62 deletions
+0
-62
src/cultures.schema/cultures.schema.js
deleted
100644 → 0
View file @
087b820f
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
This diff is collapsed.
Click to expand it.
src/plantation.schema/plantation.schema.js
deleted
100644 → 0
View file @
087b820f
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
This diff is collapsed.
Click to expand it.
src/plants.schema/plants.schema.js
deleted
100644 → 0
View file @
087b820f
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
This diff is collapsed.
Click to expand it.
src/users.schema/users.schema.js
deleted
100644 → 0
View file @
087b820f
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
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help