Last active
December 26, 2015 14:28
-
-
Save nmu/7165386 to your computer and use it in GitHub Desktop.
Model Dump: rough model schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get / (index) | |
- if not logged in | |
=> prompt login (facebook) | |
- elif logged in && !avail | |
=> create hangout? | |
=> be available so your friends can hangout? (fomo fomo fomo) | |
- else (logged in & available) | |
=> (n friends are available, ) create a hangout? | |
post /login | |
- receive fb info | |
- if new user | |
=> persist in db | |
- else | |
=> update any change data | |
save session (so they don't have to login again) | |
redirect to index | |
post /logout | |
clear session | |
get /hangout/new # create a new thing, and choose an activity/location | |
post /hangout/new # process the new thing that this is | |
get /hangout/{{id}} # show the hangout | |
get /hangout/{{id}}/available_friends # list friends within radius of hangout location | |
post /hangout/{{id}}/propose_alternative <-- i'm a responder and i don't like your activity? | |
get /hangout/{{id}}/edit # change details and try to reinvite | |
post /hangout/{{id}}/invite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "1586010021", | |
"name": "Ni Mu", | |
"first_name": "Ni", | |
"last_name": "Mu", | |
"link": "https://www.facebook.com/nickelmu", | |
"username": "nickelmu", | |
"location": { | |
"id": "114952118516947", | |
"name": "San Francisco, California" | |
}, | |
"work": [ | |
{ | |
"employer": { | |
"id": "51456368499", | |
"name": "One Kings Lane" | |
}, | |
"position": { | |
"id": "102348553153799", | |
"name": "Front End Engineer" | |
}, | |
"start_date": "2013-01-01" | |
}, | |
{ | |
"employer": { | |
"id": "273948542621348", | |
"name": "Tian Mitochondrial Metabolism Lab" | |
}, | |
"position": { | |
"id": "137517612950146", | |
"name": "Undergraduate Research Assistant" | |
}, | |
"start_date": "2011-01-01", | |
"end_date": "2011-01-01" | |
}, | |
{ | |
"employer": { | |
"id": "108169279215944", | |
"name": "TPM Media" | |
}, | |
"position": { | |
"id": "137468219620206", | |
"name": "Web Designer & Developer" | |
}, | |
"description": "Web design & front-end dev for Talking Points Memo.", | |
"start_date": "2011-01-01", | |
"end_date": "2012-01-01" | |
}, | |
{ | |
"employer": { | |
"id": "28155342312", | |
"name": "Pipeline Project at the University of Washington" | |
}, | |
"position": { | |
"id": "175557849209249", | |
"name": "Web/Social Media Coordinator" | |
}, | |
"start_date": "2010-01-01", | |
"end_date": "2011-01-01" | |
}, | |
{ | |
"employer": { | |
"id": "123516157692446", | |
"name": "The Daily of the University of Washington" | |
}, | |
"position": { | |
"id": "108320022525889", | |
"name": "Web Developer" | |
}, | |
"start_date": "2007-01-01", | |
"end_date": "2007-01-01" | |
}, | |
{ | |
"employer": { | |
"id": "113782905301614", | |
"name": "Zhang Biomaterials Lab" | |
}, | |
"position": { | |
"id": "137517612950146", | |
"name": "Undergraduate Research Assistant" | |
}, | |
"start_date": "2007-01-01", | |
"end_date": "2009-01-01" | |
} | |
], | |
"education": [ | |
{ | |
"school": { | |
"id": "8829726273", | |
"name": "University of Washington" | |
}, | |
"year": { | |
"id": "201638419856163", | |
"name": "2011" | |
}, | |
"concentration": [ | |
{ | |
"id": "103724069666039", | |
"name": "Biochemistry" | |
} | |
], | |
"type": "College" | |
} | |
], | |
"gender": "female", | |
"timezone": -7, | |
"locale": "en_US", | |
"languages": [ | |
{ | |
"id": "149462618399744", | |
"name": "Sichuanese Mandarin" | |
}, | |
{ | |
"id": "108141285874914", | |
"name": "Spanglish" | |
} | |
], | |
"verified": true, | |
"updated_time": "2013-10-25T17:04:17+0000" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Relational | |
User | |
- id {Int} # our own or Facebook's? | |
- fb_access_token: {Varchar} | |
- fb_login_status: {Bool} | |
- phone_number | |
- photo_url | |
- is_active | |
Friendship | |
(user id join table) | |
## Non-relational | |
Hangout | |
location: {Name or geolocation spec?} | |
activity: {String???} | |
user_ids: [] # do we need an active/inactive on this hangout? | |
last_request_time: {DateTime} | |
request_count: {Int} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment