aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/model')
-rw-r--r--src/org/traccar/model/DeviceDriver.java41
-rw-r--r--src/org/traccar/model/Driver.java40
-rw-r--r--src/org/traccar/model/DriverPermission.java40
-rw-r--r--src/org/traccar/model/Event.java2
-rw-r--r--src/org/traccar/model/GroupDriver.java41
-rw-r--r--src/org/traccar/model/Position.java3
6 files changed, 166 insertions, 1 deletions
diff --git a/src/org/traccar/model/DeviceDriver.java b/src/org/traccar/model/DeviceDriver.java
new file mode 100644
index 000000000..2008aaddf
--- /dev/null
+++ b/src/org/traccar/model/DeviceDriver.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 Andrey Kunitsyn (andrey@traccar.org)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.traccar.model;
+
+public class DeviceDriver {
+
+ private long deviceId;
+
+ public long getDeviceId() {
+ return deviceId;
+ }
+
+ public void setDeviceId(long deviceId) {
+ this.deviceId = deviceId;
+ }
+
+ private long driverId;
+
+ public long getDriverId() {
+ return driverId;
+ }
+
+ public void setDriverId(long driverId) {
+ this.driverId = driverId;
+ }
+
+}
diff --git a/src/org/traccar/model/Driver.java b/src/org/traccar/model/Driver.java
new file mode 100644
index 000000000..7a51d9151
--- /dev/null
+++ b/src/org/traccar/model/Driver.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 Andrey Kunitsyn (andrey@traccar.org)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.traccar.model;
+
+public class Driver extends Extensible {
+
+ private String name;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ private String uniqueId;
+
+ public String getUniqueId() {
+ return uniqueId;
+ }
+
+ public void setUniqueId(String uniqueId) {
+ this.uniqueId = uniqueId;
+ }
+}
diff --git a/src/org/traccar/model/DriverPermission.java b/src/org/traccar/model/DriverPermission.java
new file mode 100644
index 000000000..cdbcc4a50
--- /dev/null
+++ b/src/org/traccar/model/DriverPermission.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 Andrey Kunitsyn (andrey@traccar.org)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.traccar.model;
+
+public class DriverPermission {
+
+ private long userId;
+
+ public long getUserId() {
+ return userId;
+ }
+
+ public void setUserId(long userId) {
+ this.userId = userId;
+ }
+
+ private long driverId;
+
+ public long getDriverId() {
+ return driverId;
+ }
+
+ public void setDriverId(long driverId) {
+ this.driverId = driverId;
+ }
+}
diff --git a/src/org/traccar/model/Event.java b/src/org/traccar/model/Event.java
index 6a24d91c6..2d836abeb 100644
--- a/src/org/traccar/model/Event.java
+++ b/src/org/traccar/model/Event.java
@@ -61,6 +61,8 @@ public class Event extends Message {
public static final String TYPE_TEXT_MESSAGE = "textMessage";
+ public static final String TYPE_DRIVER_CHANGED = "driverChanged";
+
private Date serverTime;
public Date getServerTime() {
diff --git a/src/org/traccar/model/GroupDriver.java b/src/org/traccar/model/GroupDriver.java
new file mode 100644
index 000000000..91b205923
--- /dev/null
+++ b/src/org/traccar/model/GroupDriver.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 Andrey Kunitsyn (andrey@traccar.org)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.traccar.model;
+
+public class GroupDriver {
+
+ private long groupId;
+
+ public long getGroupId() {
+ return groupId;
+ }
+
+ public void setGroupId(long groupId) {
+ this.groupId = groupId;
+ }
+
+ private long driverId;
+
+ public long getDriverId() {
+ return driverId;
+ }
+
+ public void setDriverId(long driverId) {
+ this.driverId = driverId;
+ }
+
+}
diff --git a/src/org/traccar/model/Position.java b/src/org/traccar/model/Position.java
index 5835310ae..9e7bac932 100644
--- a/src/org/traccar/model/Position.java
+++ b/src/org/traccar/model/Position.java
@@ -49,7 +49,6 @@ public class Position extends Message {
public static final String KEY_FUEL_LEVEL = "fuel"; // liters
public static final String KEY_FUEL_CONSUMPTION = "fuelConsumption"; // liters/hour
- public static final String KEY_RFID = "rfid";
public static final String KEY_VERSION_FW = "versionFw";
public static final String KEY_VERSION_HW = "versionHw";
public static final String KEY_TYPE = "type";
@@ -81,6 +80,8 @@ public class Position extends Message {
public static final String KEY_RESULT = "result";
+ public static final String KEY_DRIVER_UNIQUE_ID = "driverUniqueId";
+
// Start with 1 not 0
public static final String PREFIX_TEMP = "temp";
public static final String PREFIX_ADC = "adc";