/**
 * mSupply Mobile
 * Sustainable Solutions (NZ) Ltd. 2020
 */

import Realm from 'realm';

export class Sensor extends Realm.Object {}

Sensor.schema = {
  name: 'Sensor',
  primaryKey: 'id',
  properties: {
    id: 'string',
    macAddress: { type: 'string', optional: true },
    name: { type: 'string', optional: true },
    batteryLevel: { type: 'double', default: 0 },
  },
};

export default Sensor;

@@ -371,16 +371,111 @@
 t: 0 %7D,%0A
+    rawSensorLogs: %7B type: 'linkingObjects', objectType: 'RawSensorLog', property: 'sensor' %7D,%0A
   %7D,%0A%7D;%0A

Add Sensor type