mirror of
https://github.com/traccar/traccar.git
synced 2025-01-08 11:47:49 +08:00
Extend device model with management info
This commit is contained in:
parent
dd6170837e
commit
f7a00616b1
14
debug.xml
14
debug.xml
@ -168,11 +168,21 @@
|
||||
</entry>
|
||||
|
||||
<entry key='database.insertDevice'>
|
||||
INSERT INTO devices (name, uniqueId, groupId, attributes) VALUES (:name, :uniqueId, :groupId, :attributes)
|
||||
INSERT INTO devices (name, uniqueId, groupId, attributes, phone, model, contact, type)
|
||||
VALUES (:name, :uniqueId, :groupId, :attributes, :phone, :model, :contact, :type)
|
||||
</entry>
|
||||
|
||||
<entry key='database.updateDevice'>
|
||||
UPDATE devices SET name = :name, uniqueId = :uniqueId, groupId = :groupId, attributes = :attributes WHERE id = :id
|
||||
UPDATE devices SET
|
||||
name = :name,
|
||||
uniqueId = :uniqueId,
|
||||
groupId = :groupId,
|
||||
attributes = :attributes,
|
||||
phone = :phone,
|
||||
model = :model,
|
||||
contact = :contact,
|
||||
type = :type
|
||||
WHERE id = :id
|
||||
</entry>
|
||||
|
||||
<entry key='database.updateDeviceStatus'>
|
||||
|
@ -94,5 +94,18 @@
|
||||
<modifyDataType tableName="groups" columnName="attributes" newDataType="VARCHAR(4000)" />
|
||||
<modifyDataType tableName="server" columnName="attributes" newDataType="VARCHAR(4000)" />
|
||||
|
||||
<addColumn tableName="devices">
|
||||
<column name="phone" type="VARCHAR(128)" />
|
||||
</addColumn>
|
||||
<addColumn tableName="devices">
|
||||
<column name="model" type="VARCHAR(128)" />
|
||||
</addColumn>
|
||||
<addColumn tableName="devices">
|
||||
<column name="contact" type="VARCHAR(512)" />
|
||||
</addColumn>
|
||||
<addColumn tableName="devices">
|
||||
<column name="type" type="VARCHAR(128)" />
|
||||
</addColumn>
|
||||
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
|
@ -101,4 +101,44 @@ public class Device extends Extensible {
|
||||
public void setGeofenceIds(List<Long> 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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user