{
_id: String,
createdAt: Date,
name: String,
lastName: String,
mail: String,
password: String
}
{
_id: String,
createdAt: Date,
name: String,
address: String,
users: [String],
devices: [String]
}
{
_id: String,
createdAt: Date,
updatedAt: Date,
model: String,
active: Boolean,
sensors: [String]
}
{
_id: String,
createdAt: Date,
active: Boolean,
name: String,
sensorsData: [String]
}
{
_id: String,
createdAt: Date,
state: String,
sentAt: Date
}
Creates a new account.
Params: {
name: String,
address: String
}
Creates a new user for an account.
Params: {
mail: String,
password: String,
name: String,
lastName: String
}
Creates a new device for an account.
Params: {
model: String,
active: Boolean,
accountId: String (el ID del account al que pertenece)
}
Creates a new sensor for a device.
Params: {
name: String,
active: Boolean
}
Creates a new sensor data for a sensor.
Params: {
state: String (Entro o Salio),
sentAt: Date
}
####Deploy: Just run:
$ pm2 deploy ecosystem.json production