give me the class defination of below javascript object: { “id”: 4, “socketIdentity”:…
- User
give me the class defination of below javascript object: { “id”: 4, “socketIdentity”: null, “deviceIP”: null, “devicePort”: null, “batteryVolume”: 85, “voltage”: 27.22000000, “current”: 2.31000000, “latitude”: 120.13400000, “longitude”: 133.77500000, “position”: 25, “totalRunTime”: null, “totalRunDistance”: null, “runCount”: null, “workingStatus”: 1, “gatherTime”: “2020-04-04 19:02:00”, “recordTime”: “2023-04-20 10:16:00”, “areaId”: 1, “modelId”: 1, “modelType”: 3 }
- Assistant
class Device { constructor(id, socketIdentity, deviceIP, devicePort, batteryVolume, voltage, current, latitude, longitude, position, totalRunTime, totalRunDistance, runCount, workingStatus, gatherTime, recordTime, areaId, modelId, modelType) { this.id = id; this.socketIdentity = socketIdentity; this.deviceIP = deviceIP; this.devicePort = devicePort; this.batteryVolume = batteryVolume; this.voltage = voltage; this.current = current; this.latitude = latitude; this.longitude = longitude; this.position = position; this.totalRunTime = totalRunTime; this.totalRunDistance = totalRunDistance; this.runCount = runCount; this.workingStatus = workingStatus; this.gatherTime = gatherTime; this.recordTime = recordTime; this.areaId = areaId; this.modelId = modelId; this.modelType = modelType; } }