@ -4,6 +4,7 @@ export interface ILogs {
_id?: number;
drone_id: number;
gprmc: String;
gps_data: Object;
sensorReadings: Object;
createdAt?: Date;
updatedAt?: Date;
@ -18,6 +18,7 @@ export class LogsService {
const storedLog = new this.logsModel({
drone_id: data["id"],
gprmc: data["GPRMC"],
gps_data: data["gps_data"],
sensorReadings: data["sensorReadings"]
});
let id = await storedLog.save();
@ -3,5 +3,6 @@ import * as mongoose from 'mongoose';
export const LogsSchema = new mongoose.Schema({
drone_id: { type: Number },
gprmc: { type: String },
gps_data: { type: Object },
sensorReadings: { type: Object }
}, { timestamps: true });