Skip to content

Object Data Model

Joanna Yao edited this page Apr 7, 2023 · 14 revisions

All fields are required unless marked otherwise. Nuances regarding timestamp: JavaScript's Data object doesn't contain information about timezone by itself (it stores Epoch/Unix time), so timestamp should always be initialized with either an epoch, or a string containing a timezone offset. Otherwise, the local timezone will be applied to adjust the timestamp. See link for more.


Record:

  id:          String      // unique (PK), only alphanumeric
  latitude:    Number      // between -90 and +90 (inclusive)
  longitude:   Number      // between -180 and +180 (inclusive)
  timestamp:   Date
  driver_id:   String      // reference to Driver
  slip_score:  Number      // between 0 and 100 (inclusive)

Manager:

  id:          String      // unique (PK), only alphanumeric
  name:        String
  company_id:  String      // reference to Company

Driver:

  id:          String      // unique (PK), only alphanumeric
  name:        String
  company_id:  String      // reference to Company

Company:

  id:          String      // unique (PK), only alphanumeric
  name:        String
Clone this wiki locally