{"action":"created","comment":{"url":"https://api.github.com/repos/senamifurubayashi/senamifringe/pulls/comments/82935345","pull_request_review_id":3807237,"id":82935345,"diff_hunk":"@@ -1,43 +1,51 @@\n package models\n \n-import play.api.db._\n+import scalikejdbc.{AutoSession, ConnectionPool}\n+import javax.inject._\n \n+import org.joda.time.DateTime\n+import org.joda.time.format._\n \n-case class Topic(id: Int, topic: String) {\n+import play.api.mvc._\n+import scalikejdbc._\n+import play.api.data.Form\n+import play.api.data.Forms._\n \n-  def addData {\n-    DB.withConnection { implicit c =>\n-      val id: Int = SQL(\"insert into topic (topic, id) values ({topic}, {id})\").\n-        on('id->this.id, 'topic -> this.topic\n-          ).executeUpdate()\n-    }\n+case class Topic(id: Int, topic: String, created_at: DateTime){\n+    def date(d: DateTime): String ={\n+    val datedata = DateTimeFormat.forPattern(\"yyyy-MM-dd HH:mm:ss\").print(d)\n+    datedata\n   }\n+\n }\n \n-object Topic {\n-  val top = {\n-      get [Int](\"id\") map {\n-        case id =>\n-          topic(id)\n-      }\n-      get[String](\"topic\") map {\n-      case topic =>\n-        topic(topic)\n-    }\n-  }\n+object Topic extends SQLSyntaxSupport[Topic]{\n+\n+\n+//  Class.forName(\"com.mysql.jdbc.Driver\")\n+//  ConnectionPool.singleton(\"jdbc:mysql://localhost/data\", \"root\", \"senami\")\n+\n+  implicit val session = AutoSession\n+  override val tableName = \"topics\"\n+  def apply(rs: WrappedResultSet): Topic = new Topic(\n+    id=rs.int(\"id\"),\n+    topic=rs.string(\"topic\"),\n+    created_at=rs.jodaDateTime(\"created_at\")\n+  )\n \n-  def getAll: List[Mydata] = {\n-    DB.withConnection { implicit c =>\n-      val datas = SQL(\"Select * from topic\").\n-        as(Topic.data *)\n-      return datas\n-    }\n+  var topics: List[Topic] = sql\"select * from topics\".map(rs => Topic(rs)).list.apply()\n+  val dateTime = new DateTime()\n+  val dateString = DateTimeFormat.forPattern(\"yyyy-MM-dd HH:mm:ss\").print(dateTime)\n+\n+\n+\n+  def add(i: String) = {","path":"app/models/Topic.scala","position":67,"original_position":67,"commit_id":"54c1a8694032f44f48972da7b94fdcadca198819","original_commit_id":"54c1a8694032f44f48972da7b94fdcadca198819","user":{"login":"senamifurubayashi","id":22016891,"avatar_url":"https://avatars.githubusercontent.com/u/22016891?v=3","gravatar_id":"","url":"https://api.github.com/users/senamifurubayashi","html_url":"https://github.com/senamifurubayashi","followers_url":"https://api.github.com/users/senamifurubayashi/followers","following_url":"https://api.github.com/users/senamifurubayashi/following{/other_user}","gists_url":"https://api.github.com/users/senamifurubayashi/gists{/gist_id}","starred_url":"https://api.github.com/users/senamifurubayashi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/senamifurubayashi/subscriptions","organizations_url":"https://api.github.com/users/senamifurubayashi/orgs","repos_url":"https://api.github.com/users/senamifurubayashi/repos","events_url":"https://api.github.com/users/senamifurubayashi/events{/privacy}","received_events_url":"https://api.github.com/users/senamifurubayashi/received_events","type":"User","site_admin":false},"body":"ここは全てmsgTopic,msgComment,msgReplyに直しました","created_at":"2016-10-12T04:42:13Z","updated_at":"2016-10-12T04:42:13Z","html_url":"https://github.com/senamifurubayashi/senamifringe/pull/1#discussion_r82935345","pull_request_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/senamifurubayashi/senamifringe/pulls/comments/82935345"},"html":{"href":"https://github.com/senamifurubayashi/senamifringe/pull/1#discussion_r82935345"},"pull_request":{"href":"https://api.github.com/repos/senamifurubayashi/senamifringe/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/senamifurubayashi/senamifringe/pulls/1","id":87239572,"html_url":"https://github.com/senamifurubayashi/senamifringe/pull/1","diff_url":"https://github.com/senamifurubayashi/senamifringe/pull/1.diff","patch_url":"https://github.com/senamifurubayashi/senamifringe/pull/1.patch","issue_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/issues/1","number":1,"state":"open","locked":false,"title":"Feat all topic","user":{"login":"senamifurubayashi","id":22016891,"avatar_url":"https://avatars.githubusercontent.com/u/22016891?v=3","gravatar_id":"","url":"https://api.github.com/users/senamifurubayashi","html_url":"https://github.com/senamifurubayashi","followers_url":"https://api.github.com/users/senamifurubayashi/followers","following_url":"https://api.github.com/users/senamifurubayashi/following{/other_user}","gists_url":"https://api.github.com/users/senamifurubayashi/gists{/gist_id}","starred_url":"https://api.github.com/users/senamifurubayashi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/senamifurubayashi/subscriptions","organizations_url":"https://api.github.com/users/senamifurubayashi/orgs","repos_url":"https://api.github.com/users/senamifurubayashi/repos","events_url":"https://api.github.com/users/senamifurubayashi/events{/privacy}","received_events_url":"https://api.github.com/users/senamifurubayashi/received_events","type":"User","site_admin":false},"body":"コメントの存在しないトピックのみの削除機能完成しました","created_at":"2016-09-29T03:13:45Z","updated_at":"2016-10-12T04:42:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"634b3aae22f4a302670b6b677469fa494da6d4ec","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/pulls/1/commits","review_comments_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/pulls/1/comments","review_comment_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/issues/1/comments","statuses_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/statuses/54c1a8694032f44f48972da7b94fdcadca198819","head":{"label":"senamifurubayashi:feat_all_topic","ref":"feat_all_topic","sha":"54c1a8694032f44f48972da7b94fdcadca198819","user":{"login":"senamifurubayashi","id":22016891,"avatar_url":"https://avatars.githubusercontent.com/u/22016891?v=3","gravatar_id":"","url":"https://api.github.com/users/senamifurubayashi","html_url":"https://github.com/senamifurubayashi","followers_url":"https://api.github.com/users/senamifurubayashi/followers","following_url":"https://api.github.com/users/senamifurubayashi/following{/other_user}","gists_url":"https://api.github.com/users/senamifurubayashi/gists{/gist_id}","starred_url":"https://api.github.com/users/senamifurubayashi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/senamifurubayashi/subscriptions","organizations_url":"https://api.github.com/users/senamifurubayashi/orgs","repos_url":"https://api.github.com/users/senamifurubayashi/repos","events_url":"https://api.github.com/users/senamifurubayashi/events{/privacy}","received_events_url":"https://api.github.com/users/senamifurubayashi/received_events","type":"User","site_admin":false},"repo":{"id":67463446,"name":"senamifringe","full_name":"senamifurubayashi/senamifringe","owner":{"login":"senamifurubayashi","id":22016891,"avatar_url":"https://avatars.githubusercontent.com/u/22016891?v=3","gravatar_id":"","url":"https://api.github.com/users/senamifurubayashi","html_url":"https://github.com/senamifurubayashi","followers_url":"https://api.github.com/users/senamifurubayashi/followers","following_url":"https://api.github.com/users/senamifurubayashi/following{/other_user}","gists_url":"https://api.github.com/users/senamifurubayashi/gists{/gist_id}","starred_url":"https://api.github.com/users/senamifurubayashi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/senamifurubayashi/subscriptions","organizations_url":"https://api.github.com/users/senamifurubayashi/orgs","repos_url":"https://api.github.com/users/senamifurubayashi/repos","events_url":"https://api.github.com/users/senamifurubayashi/events{/privacy}","received_events_url":"https://api.github.com/users/senamifurubayashi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/senamifurubayashi/senamifringe","description":null,"fork":false,"url":"https://api.github.com/repos/senamifurubayashi/senamifringe","forks_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/forks","keys_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/teams","hooks_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/hooks","issue_events_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/issues/events{/number}","events_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/events","assignees_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/assignees{/user}","branches_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/branches{/branch}","tags_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/tags","blobs_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/git/refs{/sha}","trees_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/statuses/{sha}","languages_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/languages","stargazers_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/stargazers","contributors_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/contributors","subscribers_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/subscribers","subscription_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/subscription","commits_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/commits{/sha}","git_commits_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/git/commits{/sha}","comments_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/comments{/number}","issue_comment_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/issues/comments{/number}","contents_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/contents/{+path}","compare_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/merges","archive_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/downloads","issues_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/issues{/number}","pulls_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/pulls{/number}","milestones_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/milestones{/number}","notifications_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/labels{/name}","releases_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/releases{/id}","deployments_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/deployments","created_at":"2016-09-06T01:46:08Z","updated_at":"2016-09-06T04:51:32Z","pushed_at":"2016-10-06T06:38:09Z","git_url":"git://github.com/senamifurubayashi/senamifringe.git","ssh_url":"git@github.com:senamifurubayashi/senamifringe.git","clone_url":"https://github.com/senamifurubayashi/senamifringe.git","svn_url":"https://github.com/senamifurubayashi/senamifringe","homepage":null,"size":1081,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"senamifurubayashi:master","ref":"master","sha":"e474eb7a25bef0b25ae037820ab8f091e2b172b5","user":{"login":"senamifurubayashi","id":22016891,"avatar_url":"https://avatars.githubusercontent.com/u/22016891?v=3","gravatar_id":"","url":"https://api.github.com/users/senamifurubayashi","html_url":"https://github.com/senamifurubayashi","followers_url":"https://api.github.com/users/senamifurubayashi/followers","following_url":"https://api.github.com/users/senamifurubayashi/following{/other_user}","gists_url":"https://api.github.com/users/senamifurubayashi/gists{/gist_id}","starred_url":"https://api.github.com/users/senamifurubayashi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/senamifurubayashi/subscriptions","organizations_url":"https://api.github.com/users/senamifurubayashi/orgs","repos_url":"https://api.github.com/users/senamifurubayashi/repos","events_url":"https://api.github.com/users/senamifurubayashi/events{/privacy}","received_events_url":"https://api.github.com/users/senamifurubayashi/received_events","type":"User","site_admin":false},"repo":{"id":67463446,"name":"senamifringe","full_name":"senamifurubayashi/senamifringe","owner":{"login":"senamifurubayashi","id":22016891,"avatar_url":"https://avatars.githubusercontent.com/u/22016891?v=3","gravatar_id":"","url":"https://api.github.com/users/senamifurubayashi","html_url":"https://github.com/senamifurubayashi","followers_url":"https://api.github.com/users/senamifurubayashi/followers","following_url":"https://api.github.com/users/senamifurubayashi/following{/other_user}","gists_url":"https://api.github.com/users/senamifurubayashi/gists{/gist_id}","starred_url":"https://api.github.com/users/senamifurubayashi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/senamifurubayashi/subscriptions","organizations_url":"https://api.github.com/users/senamifurubayashi/orgs","repos_url":"https://api.github.com/users/senamifurubayashi/repos","events_url":"https://api.github.com/users/senamifurubayashi/events{/privacy}","received_events_url":"https://api.github.com/users/senamifurubayashi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/senamifurubayashi/senamifringe","description":null,"fork":false,"url":"https://api.github.com/repos/senamifurubayashi/senamifringe","forks_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/forks","keys_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/teams","hooks_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/hooks","issue_events_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/issues/events{/number}","events_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/events","assignees_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/assignees{/user}","branches_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/branches{/branch}","tags_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/tags","blobs_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/git/refs{/sha}","trees_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/statuses/{sha}","languages_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/languages","stargazers_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/stargazers","contributors_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/contributors","subscribers_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/subscribers","subscription_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/subscription","commits_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/commits{/sha}","git_commits_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/git/commits{/sha}","comments_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/comments{/number}","issue_comment_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/issues/comments{/number}","contents_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/contents/{+path}","compare_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/merges","archive_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/downloads","issues_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/issues{/number}","pulls_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/pulls{/number}","milestones_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/milestones{/number}","notifications_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/labels{/name}","releases_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/releases{/id}","deployments_url":"https://api.github.com/repos/senamifurubayashi/senamifringe/deployments","created_at":"2016-09-06T01:46:08Z","updated_at":"2016-09-06T04:51:32Z","pushed_at":"2016-10-06T06:38:09Z","git_url":"git://github.com/senamifurubayashi/senamifringe.git","ssh_url":"git@github.com:senamifurubayashi/senamifringe.git","clone_url":"https://github.com/senamifurubayashi/senamifringe.git","svn_url":"https://github.com/senamifurubayashi/senamifringe","homepage":null,"size":1081,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/senamifurubayashi/senamifringe/pulls/1"},"html":{"href":"https://github.com/senamifurubayashi/senamifringe/pull/1"},"issue":{"href":"https://api.github.com/repos/senamifurubayashi/senamifringe/issues/1"},"comments":{"href":"https://api.github.com/repos/senamifurubayashi/senamifringe/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/senamifurubayashi/senamifringe/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/senamifurubayashi/senamifringe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/senamifurubayashi/senamifringe/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/senamifurubayashi/senamifringe/statuses/54c1a8694032f44f48972da7b94fdcadca198819"}}}}
{"actor":{"display_login":"senamifurubayashi"}}