{"action":"created","comment":{"url":"https://api.github.com/repos/TeamPersona/Persona-API/pulls/comments/35932536","id":35932536,"diff_hunk":"@@ -0,0 +1,60 @@\n+package persona.api.offer.offerImpl\n+\n+import java.util.UUID\n+\n+import com.datastax.driver.core.Row\n+import com.websudos.phantom.CassandraTable\n+import com.websudos.phantom.dsl.{context => _, _}\n+import com.websudos.phantom.keys.PartitionKey\n+import org.joda.time.DateTime\n+import persona.api.offer.Offer\n+import persona.db.PersonaCassandraConnector\n+\n+import scala.concurrent.{ExecutionContext, Future}\n+\n+\n+class OfferDataTable extends CassandraTable[OfferDataTable, Offer] {\n+\n+  object creationDay extends StringColumn(this) with PartitionKey[String]\n+  object timeID extends TimeUUIDColumn(this) with ClusteringOrder[UUID] with Descending\n+  object description extends StringColumn(this)\n+  object expirationTime extends DateTimeColumn(this)\n+  object currentParticipants extends IntColumn(this)\n+  object maxParticipants extends IntColumn(this)\n+  object value extends DoubleColumn(this)\n+  object criteria extends MapColumn[OfferDataTable, Offer, String, String](this)\n+\n+  def fromRow(row: Row): Offer = {\n+    Offer(\n+      timeID(row),\n+      DateTime.parse(creationDay(row)), // TODO: format?\n+      description(row),\n+      expirationTime(row),\n+      currentParticipants(row),\n+      maxParticipants(row),\n+      value(row),\n+      criteria(row)\n+    )\n+  }\n+\n+}\n+\n+\n+class CassandraOfferDataDAO extends OfferDataTable with OfferDAO with PersonaCassandraConnector  {\n+  // TODO:limit actually 25 for these two?\n+  def list(implicit ec: ExecutionContext): Future[Seq[Offer]] = {\n+    select\n+      .limit(25)","path":"app/persona/api/offer/offerImpl/CassandraOfferDataDAO.scala","position":47,"original_position":47,"commit_id":"85cceb15494a878217a2e710a8d06bd9948d1d55","original_commit_id":"85cceb15494a878217a2e710a8d06bd9948d1d55","user":{"login":"m26jiang","id":6406459,"avatar_url":"https://avatars.githubusercontent.com/u/6406459?v=3","gravatar_id":"","url":"https://api.github.com/users/m26jiang","html_url":"https://github.com/m26jiang","followers_url":"https://api.github.com/users/m26jiang/followers","following_url":"https://api.github.com/users/m26jiang/following{/other_user}","gists_url":"https://api.github.com/users/m26jiang/gists{/gist_id}","starred_url":"https://api.github.com/users/m26jiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m26jiang/subscriptions","organizations_url":"https://api.github.com/users/m26jiang/orgs","repos_url":"https://api.github.com/users/m26jiang/repos","events_url":"https://api.github.com/users/m26jiang/events{/privacy}","received_events_url":"https://api.github.com/users/m26jiang/received_events","type":"User","site_admin":false},"body":"Maybe find a way to pull from config down the road\r\n","created_at":"2015-07-30T23:17:34Z","updated_at":"2015-07-30T23:17:34Z","html_url":"https://github.com/TeamPersona/Persona-API/pull/7#discussion_r35932536","pull_request_url":"https://api.github.com/repos/TeamPersona/Persona-API/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/TeamPersona/Persona-API/pulls/comments/35932536"},"html":{"href":"https://github.com/TeamPersona/Persona-API/pull/7#discussion_r35932536"},"pull_request":{"href":"https://api.github.com/repos/TeamPersona/Persona-API/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/TeamPersona/Persona-API/pulls/7","id":41283792,"html_url":"https://github.com/TeamPersona/Persona-API/pull/7","diff_url":"https://github.com/TeamPersona/Persona-API/pull/7.diff","patch_url":"https://github.com/TeamPersona/Persona-API/pull/7.patch","issue_url":"https://api.github.com/repos/TeamPersona/Persona-API/issues/7","number":7,"state":"open","locked":false,"title":"Offers","user":{"login":"rpcrezel","id":6539417,"avatar_url":"https://avatars.githubusercontent.com/u/6539417?v=3","gravatar_id":"","url":"https://api.github.com/users/rpcrezel","html_url":"https://github.com/rpcrezel","followers_url":"https://api.github.com/users/rpcrezel/followers","following_url":"https://api.github.com/users/rpcrezel/following{/other_user}","gists_url":"https://api.github.com/users/rpcrezel/gists{/gist_id}","starred_url":"https://api.github.com/users/rpcrezel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpcrezel/subscriptions","organizations_url":"https://api.github.com/users/rpcrezel/orgs","repos_url":"https://api.github.com/users/rpcrezel/repos","events_url":"https://api.github.com/users/rpcrezel/events{/privacy}","received_events_url":"https://api.github.com/users/rpcrezel/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-30T21:24:04Z","updated_at":"2015-07-30T23:17:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cb15c325dd922836459b1f3e95639efc4039b4fa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/TeamPersona/Persona-API/pulls/7/commits","review_comments_url":"https://api.github.com/repos/TeamPersona/Persona-API/pulls/7/comments","review_comment_url":"https://api.github.com/repos/TeamPersona/Persona-API/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TeamPersona/Persona-API/issues/7/comments","statuses_url":"https://api.github.com/repos/TeamPersona/Persona-API/statuses/85cceb15494a878217a2e710a8d06bd9948d1d55","head":{"label":"TeamPersona:offers","ref":"offers","sha":"85cceb15494a878217a2e710a8d06bd9948d1d55","user":{"login":"TeamPersona","id":13026467,"avatar_url":"https://avatars.githubusercontent.com/u/13026467?v=3","gravatar_id":"","url":"https://api.github.com/users/TeamPersona","html_url":"https://github.com/TeamPersona","followers_url":"https://api.github.com/users/TeamPersona/followers","following_url":"https://api.github.com/users/TeamPersona/following{/other_user}","gists_url":"https://api.github.com/users/TeamPersona/gists{/gist_id}","starred_url":"https://api.github.com/users/TeamPersona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeamPersona/subscriptions","organizations_url":"https://api.github.com/users/TeamPersona/orgs","repos_url":"https://api.github.com/users/TeamPersona/repos","events_url":"https://api.github.com/users/TeamPersona/events{/privacy}","received_events_url":"https://api.github.com/users/TeamPersona/received_events","type":"Organization","site_admin":false},"repo":{"id":26155380,"name":"Persona-API","full_name":"TeamPersona/Persona-API","owner":{"login":"TeamPersona","id":13026467,"avatar_url":"https://avatars.githubusercontent.com/u/13026467?v=3","gravatar_id":"","url":"https://api.github.com/users/TeamPersona","html_url":"https://github.com/TeamPersona","followers_url":"https://api.github.com/users/TeamPersona/followers","following_url":"https://api.github.com/users/TeamPersona/following{/other_user}","gists_url":"https://api.github.com/users/TeamPersona/gists{/gist_id}","starred_url":"https://api.github.com/users/TeamPersona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeamPersona/subscriptions","organizations_url":"https://api.github.com/users/TeamPersona/orgs","repos_url":"https://api.github.com/users/TeamPersona/repos","events_url":"https://api.github.com/users/TeamPersona/events{/privacy}","received_events_url":"https://api.github.com/users/TeamPersona/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TeamPersona/Persona-API","description":"","fork":false,"url":"https://api.github.com/repos/TeamPersona/Persona-API","forks_url":"https://api.github.com/repos/TeamPersona/Persona-API/forks","keys_url":"https://api.github.com/repos/TeamPersona/Persona-API/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TeamPersona/Persona-API/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TeamPersona/Persona-API/teams","hooks_url":"https://api.github.com/repos/TeamPersona/Persona-API/hooks","issue_events_url":"https://api.github.com/repos/TeamPersona/Persona-API/issues/events{/number}","events_url":"https://api.github.com/repos/TeamPersona/Persona-API/events","assignees_url":"https://api.github.com/repos/TeamPersona/Persona-API/assignees{/user}","branches_url":"https://api.github.com/repos/TeamPersona/Persona-API/branches{/branch}","tags_url":"https://api.github.com/repos/TeamPersona/Persona-API/tags","blobs_url":"https://api.github.com/repos/TeamPersona/Persona-API/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TeamPersona/Persona-API/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TeamPersona/Persona-API/git/refs{/sha}","trees_url":"https://api.github.com/repos/TeamPersona/Persona-API/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TeamPersona/Persona-API/statuses/{sha}","languages_url":"https://api.github.com/repos/TeamPersona/Persona-API/languages","stargazers_url":"https://api.github.com/repos/TeamPersona/Persona-API/stargazers","contributors_url":"https://api.github.com/repos/TeamPersona/Persona-API/contributors","subscribers_url":"https://api.github.com/repos/TeamPersona/Persona-API/subscribers","subscription_url":"https://api.github.com/repos/TeamPersona/Persona-API/subscription","commits_url":"https://api.github.com/repos/TeamPersona/Persona-API/commits{/sha}","git_commits_url":"https://api.github.com/repos/TeamPersona/Persona-API/git/commits{/sha}","comments_url":"https://api.github.com/repos/TeamPersona/Persona-API/comments{/number}","issue_comment_url":"https://api.github.com/repos/TeamPersona/Persona-API/issues/comments{/number}","contents_url":"https://api.github.com/repos/TeamPersona/Persona-API/contents/{+path}","compare_url":"https://api.github.com/repos/TeamPersona/Persona-API/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TeamPersona/Persona-API/merges","archive_url":"https://api.github.com/repos/TeamPersona/Persona-API/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TeamPersona/Persona-API/downloads","issues_url":"https://api.github.com/repos/TeamPersona/Persona-API/issues{/number}","pulls_url":"https://api.github.com/repos/TeamPersona/Persona-API/pulls{/number}","milestones_url":"https://api.github.com/repos/TeamPersona/Persona-API/milestones{/number}","notifications_url":"https://api.github.com/repos/TeamPersona/Persona-API/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TeamPersona/Persona-API/labels{/name}","releases_url":"https://api.github.com/repos/TeamPersona/Persona-API/releases{/id}","created_at":"2014-11-04T06:07:22Z","updated_at":"2015-06-26T15:59:30Z","pushed_at":"2015-07-30T22:17:11Z","git_url":"git://github.com/TeamPersona/Persona-API.git","ssh_url":"git@github.com:TeamPersona/Persona-API.git","clone_url":"https://github.com/TeamPersona/Persona-API.git","svn_url":"https://github.com/TeamPersona/Persona-API","homepage":null,"size":465,"stargazers_count":2,"watchers_count":2,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"TeamPersona:master","ref":"master","sha":"cfa1f9016c9cef8bb2130634111afe8678121856","user":{"login":"TeamPersona","id":13026467,"avatar_url":"https://avatars.githubusercontent.com/u/13026467?v=3","gravatar_id":"","url":"https://api.github.com/users/TeamPersona","html_url":"https://github.com/TeamPersona","followers_url":"https://api.github.com/users/TeamPersona/followers","following_url":"https://api.github.com/users/TeamPersona/following{/other_user}","gists_url":"https://api.github.com/users/TeamPersona/gists{/gist_id}","starred_url":"https://api.github.com/users/TeamPersona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeamPersona/subscriptions","organizations_url":"https://api.github.com/users/TeamPersona/orgs","repos_url":"https://api.github.com/users/TeamPersona/repos","events_url":"https://api.github.com/users/TeamPersona/events{/privacy}","received_events_url":"https://api.github.com/users/TeamPersona/received_events","type":"Organization","site_admin":false},"repo":{"id":26155380,"name":"Persona-API","full_name":"TeamPersona/Persona-API","owner":{"login":"TeamPersona","id":13026467,"avatar_url":"https://avatars.githubusercontent.com/u/13026467?v=3","gravatar_id":"","url":"https://api.github.com/users/TeamPersona","html_url":"https://github.com/TeamPersona","followers_url":"https://api.github.com/users/TeamPersona/followers","following_url":"https://api.github.com/users/TeamPersona/following{/other_user}","gists_url":"https://api.github.com/users/TeamPersona/gists{/gist_id}","starred_url":"https://api.github.com/users/TeamPersona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeamPersona/subscriptions","organizations_url":"https://api.github.com/users/TeamPersona/orgs","repos_url":"https://api.github.com/users/TeamPersona/repos","events_url":"https://api.github.com/users/TeamPersona/events{/privacy}","received_events_url":"https://api.github.com/users/TeamPersona/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TeamPersona/Persona-API","description":"","fork":false,"url":"https://api.github.com/repos/TeamPersona/Persona-API","forks_url":"https://api.github.com/repos/TeamPersona/Persona-API/forks","keys_url":"https://api.github.com/repos/TeamPersona/Persona-API/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TeamPersona/Persona-API/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TeamPersona/Persona-API/teams","hooks_url":"https://api.github.com/repos/TeamPersona/Persona-API/hooks","issue_events_url":"https://api.github.com/repos/TeamPersona/Persona-API/issues/events{/number}","events_url":"https://api.github.com/repos/TeamPersona/Persona-API/events","assignees_url":"https://api.github.com/repos/TeamPersona/Persona-API/assignees{/user}","branches_url":"https://api.github.com/repos/TeamPersona/Persona-API/branches{/branch}","tags_url":"https://api.github.com/repos/TeamPersona/Persona-API/tags","blobs_url":"https://api.github.com/repos/TeamPersona/Persona-API/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TeamPersona/Persona-API/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TeamPersona/Persona-API/git/refs{/sha}","trees_url":"https://api.github.com/repos/TeamPersona/Persona-API/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TeamPersona/Persona-API/statuses/{sha}","languages_url":"https://api.github.com/repos/TeamPersona/Persona-API/languages","stargazers_url":"https://api.github.com/repos/TeamPersona/Persona-API/stargazers","contributors_url":"https://api.github.com/repos/TeamPersona/Persona-API/contributors","subscribers_url":"https://api.github.com/repos/TeamPersona/Persona-API/subscribers","subscription_url":"https://api.github.com/repos/TeamPersona/Persona-API/subscription","commits_url":"https://api.github.com/repos/TeamPersona/Persona-API/commits{/sha}","git_commits_url":"https://api.github.com/repos/TeamPersona/Persona-API/git/commits{/sha}","comments_url":"https://api.github.com/repos/TeamPersona/Persona-API/comments{/number}","issue_comment_url":"https://api.github.com/repos/TeamPersona/Persona-API/issues/comments{/number}","contents_url":"https://api.github.com/repos/TeamPersona/Persona-API/contents/{+path}","compare_url":"https://api.github.com/repos/TeamPersona/Persona-API/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TeamPersona/Persona-API/merges","archive_url":"https://api.github.com/repos/TeamPersona/Persona-API/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TeamPersona/Persona-API/downloads","issues_url":"https://api.github.com/repos/TeamPersona/Persona-API/issues{/number}","pulls_url":"https://api.github.com/repos/TeamPersona/Persona-API/pulls{/number}","milestones_url":"https://api.github.com/repos/TeamPersona/Persona-API/milestones{/number}","notifications_url":"https://api.github.com/repos/TeamPersona/Persona-API/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TeamPersona/Persona-API/labels{/name}","releases_url":"https://api.github.com/repos/TeamPersona/Persona-API/releases{/id}","created_at":"2014-11-04T06:07:22Z","updated_at":"2015-06-26T15:59:30Z","pushed_at":"2015-07-30T22:17:11Z","git_url":"git://github.com/TeamPersona/Persona-API.git","ssh_url":"git@github.com:TeamPersona/Persona-API.git","clone_url":"https://github.com/TeamPersona/Persona-API.git","svn_url":"https://github.com/TeamPersona/Persona-API","homepage":null,"size":465,"stargazers_count":2,"watchers_count":2,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TeamPersona/Persona-API/pulls/7"},"html":{"href":"https://github.com/TeamPersona/Persona-API/pull/7"},"issue":{"href":"https://api.github.com/repos/TeamPersona/Persona-API/issues/7"},"comments":{"href":"https://api.github.com/repos/TeamPersona/Persona-API/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/TeamPersona/Persona-API/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/TeamPersona/Persona-API/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TeamPersona/Persona-API/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/TeamPersona/Persona-API/statuses/85cceb15494a878217a2e710a8d06bd9948d1d55"}}}}