{"action":"created","issue":{"url":"https://api.github.com/repos/CigarZh/web_tasks/issues/4","repository_url":"https://api.github.com/repos/CigarZh/web_tasks","labels_url":"https://api.github.com/repos/CigarZh/web_tasks/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/CigarZh/web_tasks/issues/4/comments","events_url":"https://api.github.com/repos/CigarZh/web_tasks/issues/4/events","html_url":"https://github.com/CigarZh/web_tasks/issues/4","id":171141088,"number":4,"title":"B3P1修改建议","user":{"login":"JasonSi","id":13177974,"avatar_url":"https://avatars.githubusercontent.com/u/13177974?v=3","gravatar_id":"","url":"https://api.github.com/users/JasonSi","html_url":"https://github.com/JasonSi","followers_url":"https://api.github.com/users/JasonSi/followers","following_url":"https://api.github.com/users/JasonSi/following{/other_user}","gists_url":"https://api.github.com/users/JasonSi/gists{/gist_id}","starred_url":"https://api.github.com/users/JasonSi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JasonSi/subscriptions","organizations_url":"https://api.github.com/users/JasonSi/orgs","repos_url":"https://api.github.com/users/JasonSi/repos","events_url":"https://api.github.com/users/JasonSi/events{/privacy}","received_events_url":"https://api.github.com/users/JasonSi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CigarZh/web_tasks/labels/help%20wanted","name":"help wanted","color":"128A0C"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-15T09:54:25Z","updated_at":"2016-08-16T13:51:49Z","closed_at":"2016-08-16T12:29:04Z","body":"## Posts\r\n- id就行了，不用pid，cid什么的，在不同的表里，字段名并不会冲突。这也是Rails建表惯例\r\n- **rails migration会默认自动生成三个字段id, created_at, updated_at  分别是id，创建时间，最近更新时间**\r\n- 不建议用text这样的名字，因为这是数据类型的名字，可以考虑 content\r\n- 你的posts要关联user表，就用user_id字段而不是author_id\r\n- status可以考虑用数字，然后在Rails里映射成几个规定的符号，参考enum的使用。比如0表示未公开，1表示公开，2表示软删除等等。\r\n- posts关联comment不是这么关联的，在comment表有一个post_id字段就可以了，他们是一对多关系。\r\n\r\n## Comments\r\n- comments表不需要pid，用post_id,也不需要author_id这种东西。可以通过post_id找到post进而找到user\r\n- 这个表字段好多啊，还有父级评论这种东西。。 不嫌麻烦的话，你看看自关联的东西吧。不建议你现在弄这么复杂\r\n\r\n## Feedbacks\r\n- 为何要有所属userid。。这就是个路人，留下email就不错了。。你还要搞这么多字段。。\r\n\r\n## Users\r\n- 密码不可空。\r\n- 用户名的话不要用name啊，username之类的比较好。name是名字的意思，通常不是用户名这层意思。\r\n"},"comment":{"url":"https://api.github.com/repos/CigarZh/web_tasks/issues/comments/240107896","html_url":"https://github.com/CigarZh/web_tasks/issues/4#issuecomment-240107896","issue_url":"https://api.github.com/repos/CigarZh/web_tasks/issues/4","id":240107896,"user":{"login":"CigarZh","id":17115841,"avatar_url":"https://avatars.githubusercontent.com/u/17115841?v=3","gravatar_id":"","url":"https://api.github.com/users/CigarZh","html_url":"https://github.com/CigarZh","followers_url":"https://api.github.com/users/CigarZh/followers","following_url":"https://api.github.com/users/CigarZh/following{/other_user}","gists_url":"https://api.github.com/users/CigarZh/gists{/gist_id}","starred_url":"https://api.github.com/users/CigarZh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CigarZh/subscriptions","organizations_url":"https://api.github.com/users/CigarZh/orgs","repos_url":"https://api.github.com/users/CigarZh/repos","events_url":"https://api.github.com/users/CigarZh/events{/privacy}","received_events_url":"https://api.github.com/users/CigarZh/received_events","type":"User","site_admin":false},"created_at":"2016-08-16T13:51:49Z","updated_at":"2016-08-16T13:51:49Z","body":"会记录 id"}}
{"actor":{"display_login":"CigarZh"}}