Skip to content

DB Schema

Kshitij Shah edited this page Sep 25, 2019 · 3 revisions

{

  "chatRooms" : {
    "addTrip" : {
      "drivers" : {
        "__unique_uder_id" : {
          "__unique_id" : "__unique_message_id"
        }
      },
      "riders" : {
        "__unique_uder_id" : {
          "__unique_id" : "-__unique_message_id"
        },
        "__unique_user_id" : {
          "__unique_id" : "__unique_message_id"
        }
      }
    },
    "groupChatRoom" : {
        "__unique_group_id" : {
        "createdById" : "__unique_user_id",
        "createdByName" : "Name",
        "createdOn" : "Date Time",
        "groupId" : "__unique_group_id",
        "groupName" : "Group Name",
        "membersListWithOnlineStatus" : {
          "__unique_uder_id" : {
            "displayName" : "Name",
            "online" : boolean,
            "profileLink" : "url",
            "userId" : "__unique_uder_id"
          }
        }
      }
    },
    "messages" : {
      "__unique_group_id" : {
        "-__unique_message_id" : {
          "createdBy" : "__unique_uder_id",
          "createdByName" : "Name",
          "createdOn" : "Date Time",
          "message" : "Message",
          "messageId" : "-__unique_message_id",
          "messageType" : "Message Type",
          "notification" : BOOLEAN
        }
      }
    },
    "trips" : {
      "__unique_message_id" : {
        "driverAccepted" : {
          "driverId" : "__unique_uder_id",
          "driverLocation" : {
            "latitude" : Double,
            "longitude" : Double
          },
          "driverName" : "Kevin"
        },
        "endPoint" : {
          "address" : "Address",
          "id" : "__unique_id",
          "latitude" : Double,
          "longitude" : Double,
          "name" : "Location Name"
        },
        "riderId" : "__unique_user_id",
        "startPoint" : {
          "address" : "Address",
          "id" : "__unique_id",
          "latitude" : Double,
          "longitude" : Double,
          "name" : "Location Name"
        },
        "tripStatus" : "STATUS"
      }
    },
    "userProfiles" : {
      "__unique_uder_id" : {
        "city" : "CITY",
        "emailId" : "EMAIL",
        "firstName" : "FIRST NAME",
        "gender" : "GENDER",
        "id" : "__unique_uder_id",
        "lastName" : "LAST NAME",
        "online" : boolean,
        "userProfileImageUrl" : "url"
      }
    }
  }

}

Clone this wiki locally