Skip to content

Data Models

lelandmiller edited this page Sep 23, 2014 · 8 revisions

This page contains an overview of various data models used by the SlugCam network software.

Message

{
    "id": 1,
    "cam": "camera_name",
    "time": "unix_time",
    "type": "message_type",
    "data": {}
}

time is sent and received to/from cameras as unix timestamps, but stored as date objects

Types

video_meta

data: {
    videoStart: unix_time,
    videoEnd: unix_time

Video

The video model exists in the videos collection of the database

{
    "cam": camera_name,
    "id": video_id,
    "videoUploaded": bool,
    "videoConverted": bool,
    "uploadTime": datetime,
    "startTime": datetime,
    "endTime": datetime
}

Camera

The camera module is used in the cameras collection and describes a camera node.

{
    "name": camera_name,
    "lat": camera_latitude,
    "lng": camera_longitude,
    "lastMessage": datetime,
    "lastVideo": datetime
}
Clone this wiki locally