From f7a00616b14821203f89e63d9c887b3e98b9826e Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Thu, 20 Oct 2016 15:32:56 +0500 Subject: Extend device model with management info --- src/org/traccar/model/Device.java | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'src/org/traccar/model') diff --git a/src/org/traccar/model/Device.java b/src/org/traccar/model/Device.java index e90742836..47b8fb2a6 100644 --- a/src/org/traccar/model/Device.java +++ b/src/org/traccar/model/Device.java @@ -101,4 +101,44 @@ public class Device extends Extensible { public void setGeofenceIds(List geofenceIds) { this.geofenceIds = geofenceIds; } + + private String phone; + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + private String model; + + public String getModel() { + return model; + } + + public void setModel(String model) { + this.model = model; + } + + private String contact; + + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + private String type; + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } } -- cgit v1.2.3 From 1756637b8727f592712950e12a99521e5f5c636e Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Fri, 21 Oct 2016 06:12:37 +0500 Subject: Rename type to category --- debug.xml | 6 +++--- schema/changelog-3.8.xml | 2 +- src/org/traccar/model/Device.java | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/org/traccar/model') diff --git a/debug.xml b/debug.xml index 67b514d13..d32d9eaf8 100644 --- a/debug.xml +++ b/debug.xml @@ -168,8 +168,8 @@ - INSERT INTO devices (name, uniqueId, groupId, attributes, phone, model, contact, type) - VALUES (:name, :uniqueId, :groupId, :attributes, :phone, :model, :contact, :type) + INSERT INTO devices (name, uniqueId, groupId, attributes, phone, model, contact, category) + VALUES (:name, :uniqueId, :groupId, :attributes, :phone, :model, :contact, :category) @@ -181,7 +181,7 @@ phone = :phone, model = :model, contact = :contact, - type = :type + category = :category WHERE id = :id diff --git a/schema/changelog-3.8.xml b/schema/changelog-3.8.xml index dbf04df79..780a2d029 100644 --- a/schema/changelog-3.8.xml +++ b/schema/changelog-3.8.xml @@ -104,7 +104,7 @@ - + diff --git a/src/org/traccar/model/Device.java b/src/org/traccar/model/Device.java index 47b8fb2a6..821984c47 100644 --- a/src/org/traccar/model/Device.java +++ b/src/org/traccar/model/Device.java @@ -132,13 +132,13 @@ public class Device extends Extensible { this.contact = contact; } - private String type; + private String category; - public String getType() { - return type; + public String getCategory() { + return category; } - public void setType(String type) { - this.type = type; + public void setCategory(String category) { + this.category = category; } } -- cgit v1.2.3