Skip to content

Data Model

shaysegal edited this page Mar 21, 2017 · 1 revision

The Data Model

Intro

In this wiki page we will discuss about our project data model as you can see below: Capture.png

The System Classes

For this project we will implement classes that will be using the Parse Classes. Those classes will be used to implement the system, those classes are:

Map Location

  • lat will have the value of the latitude of a location.
  • lon will have the value of the latitude of a location.

LoginManager

  • user will have the User that loged in the system, for the loging in the system will check in the database if the user exists, and will save all of his values in this object.

DBMember

All of the Parse Classes are extending the Class so they will have the specific ParseObject that they are using

  • parseObject its an object of type ParseObject, with this kind of object you can save values of Parse Classes from the database and modifies the object in the table.
  • objectId the ID of the tables row which the parseObject is pointing to.

Parking Areas

  • parkingAreas contains a set of the parking areas that are within the Technion, will be used for managing the system.

Management

  • users contains a set of the users that signed up for the system.
  • parkingSlots contains a set of the parking slots that are within the Technion.
  • parkingAreas contains a parkingAreas object that contains the parking areas within the Technion.

The Parse Classes

for this project we are using the parse server as database of our data, in the server we created tables that are being used as classes in the project. Those classes are using each other in order in various of ways as we explain here:

User

  • name the name of the user
  • password the password of the user
  • phoneNumber the phone number of the user, maybe be use to send notifications to the user
  • carNumber the serial number of the users car will use to identify the user
  • email the email of the users, will use to communicate with the user
  • sticker the type of sticker of the user, will determine where can he park
  • currentParking saves the parking slot of a user if he parked

Parking Area

  • color each parking area has a specific color that determine who can park there.
  • areaId will be used as identifier of the area.
  • parkingSlots contains a set of the parking slots that are within the area, will be used for managing the area.

Parking Slot

  • name the slot's name. Should be a unique value.
  • status this can be either free, taken or unavailable according to the availability of the slot.
  • color each parking slot has a specific color that determine who can park there, this will be changed dynamically.
  • location an object of type mapLocation which hold the location of the slot for the navigation.
  • defaultColor the slot's default color, we store it so we can change the color back in case the time for the change had expired.
  • endTime stores a Date where you need to change to color back to the default color

Destination

  • entrance an object of type mapLocation which hold the location of the entrance, will be used in the navigation.
  • name the name of the address of our destination.