PartyStream / partyStreamApp

The Party Stream iOS App
0 stars 1 forks source link

Event Data Model #11

Open mdewolfe opened 11 years ago

mdewolfe commented 11 years ago

@iToto

I am going to use the example JSON array (its some where in one of the files, I forget which) of a list of events as my starting point for modelling the events.

iToto commented 11 years ago

was it in the pull request? I couldn't find it :(

mdewolfe commented 11 years ago

No. I had to junk my first copy of the project. And I only noticed the sample JSON array today. Still working on it.

mdewolfe commented 11 years ago

Based on the sample I found in the project, the event data model would look something like this:

PSEvent
------------
id : int
eventId : int
status : int
creationDate : NSTimeInterval (which really just a CGFloat which really just a float)
lastmodeified : NSTimeInterval
userId : int
permission : int
name : NSString
  1. I have a few questions. What is the userId intended to represent?
  2. What is the difference between the eventId and id?
  3. Are there any images that are going to be associated with any event?
  4. Is permisson needed? Why is it there?
  5. What is status? What are the possible values?

I was going to use CoreData to manage the data models, so all the ints and floats will actually be stored as NSNumbers.

I think thats enough for now.

iToto commented 11 years ago

Alright so:

  1. userId is the user that created the event. Should probably change that to creator to be more obvious
  2. not entirely sure what id is for. Looking at the ERD, there is only one id in the events table. Sooooo you can delete this lol
  3. Yes there are images that related to the event. There's an API call for that but I will be changing the end-point as @GrahamBarnard has requested here
  4. permission was added to give users the ability to set events to be read-only for certain users. Although this hasnt been implemented yet, it is in the pipeline
  5. status is also a field that I added with the intent to maybe allow users to hide images or whatnot. Not sure if this will be used, but it's there.

Hope that answers your questions. Let me know if anything is still unclear.

mdewolfe commented 11 years ago

Cool. I'll keep working on it.

mdewolfe commented 11 years ago

Here is preliminary version of the data model: https://github.com/mdewolfe/partyStreamApp/tree/FEATURE_models

There is folder called DataModels which contains the data models as an XML file. Have look tell me what you think. I would recommend pulling my data model branch an open the project form there. Xcode will display the entities with their relationships pretty well. Or you plug through the XML file.

Maybe create a new branch (develop?), I''l send a pull request and we can leave comments as needed before it is actually merged.

Let me know what you think.

iToto commented 11 years ago

Develop branch created :)

I'll look at the DataModels this evening.

iToto commented 11 years ago

Seems cool. Can you also add lat/long to the event and photo?

You can go ahead and pull-request it into develop :)

mdewolfe commented 11 years ago

Will do. I will probably do it tomorrow if that's cool. I still have to generate the header files.

iToto commented 11 years ago

no rush. I still got some updates to do on the API

iToto commented 11 years ago

yeah this looks good to me. I'll go ahead and merge it in.

Also, I was thinking of the notion of using FourSquare. What are your thoughts? It could be used to replace the location storing, or as a compliment feature. IMO it would be nice to have both seeing as how not everyone uses FourSquare.