Skip to content
This repository was archived by the owner on Sep 5, 2022. It is now read-only.
Ryan Dailey edited this page Apr 30, 2017 · 1 revision

API Models

Camera Model

  • id (NOT_NULL) – id from old database CharField(30)

  • Postgis GEOGRAPHY:

    • city (NOT_NULL) CharField(30)
    • state (NOT_NULL) CharField(12)
    • country (NOT_NULL) CharField(50)
    • lat_lng (NOT_NULL) geography(POINT,4326)
  • source (NOT_NULL) CharField(30)

  • is_video (NOT_NULL) – True if camera is a video stream NullBooleanField

  • source_url – URL of source (Not for image data!) CharField(100)

  • date_added (Automatically added) DateTimeField

  • last_updated – Last known time a snapshot was downloaded DateTimeField

  • description – Description of the camera CharField(100)

  • framerate – Frame rate of the camera in min. if known FloatField

  • outdoors – TRUE if camera is outdoors NullBooleanField

  • indoors – TRUE if the camera is indoors NullBooleanField

  • traffic – TRUE if the camera is a traffic camera NullBooleanField

  • inactive – TRUE if data cannot be accessed from the camera NullBooleanField

  • resolution_w – Resolution width determined automatically PositiveIntegerField(8)

  • resolution_h - Resolution height determined automatically PositiveIntegerField(8)

Retrieval Model:

Non_ip Attributes:

  • url (NOT_NULL, UNIQUE) CharField(100)

IP Attributes:

  • ip (NOT_NULL , unique w/ port) inet
  • port (NOT_NULL , unique w/ ip) PositiveIntegerField(11)
  • brand (NOT_NULL) PositiveIntegerField(50)
  • model (NOT_NULL) PositiveIntegerField(50)
  • video_path CharField(100)
  • image_path CharField(100)
  • rtsp_path CharField(100)

Every camera has one retrieval Model but each retrieval model can be different model: Generic Relation

User Models

Database User Model Attributes:

  • access_token (NOT_NULL , unique)
  • user_group (NOT_NULL, “Admin” / “User”)

Managed by frontend:

  • email (NOT_NULL , unique)
  • user_name (NOT_NULL , unique)
  • Other user info

Clone this wiki locally