{"action":"created","issue":{"url":"https://api.github.com/repos/NathanBland/RadioRoom/issues/1","labels_url":"https://api.github.com/repos/NathanBland/RadioRoom/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/NathanBland/RadioRoom/issues/1/comments","events_url":"https://api.github.com/repos/NathanBland/RadioRoom/issues/1/events","html_url":"https://github.com/NathanBland/RadioRoom/issues/1","id":105698564,"number":1,"title":"Station Schema","user":{"login":"NathanBland","id":926111,"avatar_url":"https://avatars.githubusercontent.com/u/926111?v=3","gravatar_id":"","url":"https://api.github.com/users/NathanBland","html_url":"https://github.com/NathanBland","followers_url":"https://api.github.com/users/NathanBland/followers","following_url":"https://api.github.com/users/NathanBland/following{/other_user}","gists_url":"https://api.github.com/users/NathanBland/gists{/gist_id}","starred_url":"https://api.github.com/users/NathanBland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NathanBland/subscriptions","organizations_url":"https://api.github.com/users/NathanBland/orgs","repos_url":"https://api.github.com/users/NathanBland/repos","events_url":"https://api.github.com/users/NathanBland/events{/privacy}","received_events_url":"https://api.github.com/users/NathanBland/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NathanBland/RadioRoom/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-09T22:43:50Z","updated_at":"2015-09-09T22:57:25Z","closed_at":null,"body":"New proposed store for a station...\r\n```javascript\r\nvar mongoose = require('mongoose');\r\n\r\nvar Track = mongoose.Schema({\r\n  added_by: {type: Schema.Types.Objectid, ref: 'User'},\r\n  votes: {up: Number, down: Number},\r\n  title: String,\r\n  url: String,\r\n  description: String,\r\n  thumbnail: String,\r\n  file_path: String,\r\n  file_name: String,\r\n  format_id: String //maybe should be number?\r\n\r\n});\r\n\r\nvar Station = mongoose.Schema({\r\n  owner: {type: Schema.Types.Objectid, ref: 'User'},\r\n  title: String,\r\n  alias: String, //URL friendly version of the above.\r\n  // Probably needs to be unique, UNLESS tied to users instead.\r\n  public: Boolean,\r\n  songQ: [track],\r\n  playing: track,\r\n  history: [track],\r\n  invited_members: [{type: Schema.Types.Objectid, ref: 'User'}],\r\n  members: [{type: Schema.Types.Objectid, ref: 'User'}]\r\n});\r\n\r\n\r\nmodule.exports = mongoose.model('Station', Station);\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/NathanBland/RadioRoom/issues/comments/139067127","html_url":"https://github.com/NathanBland/RadioRoom/issues/1#issuecomment-139067127","issue_url":"https://api.github.com/repos/NathanBland/RadioRoom/issues/1","id":139067127,"user":{"login":"NathanBland","id":926111,"avatar_url":"https://avatars.githubusercontent.com/u/926111?v=3","gravatar_id":"","url":"https://api.github.com/users/NathanBland","html_url":"https://github.com/NathanBland","followers_url":"https://api.github.com/users/NathanBland/followers","following_url":"https://api.github.com/users/NathanBland/following{/other_user}","gists_url":"https://api.github.com/users/NathanBland/gists{/gist_id}","starred_url":"https://api.github.com/users/NathanBland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NathanBland/subscriptions","organizations_url":"https://api.github.com/users/NathanBland/orgs","repos_url":"https://api.github.com/users/NathanBland/repos","events_url":"https://api.github.com/users/NathanBland/events{/privacy}","received_events_url":"https://api.github.com/users/NathanBland/received_events","type":"User","site_admin":false},"created_at":"2015-09-09T22:57:24Z","updated_at":"2015-09-09T22:57:24Z","body":"This is of course a draft. One consideration is that \r\n```javascript\r\nalias: String\r\n```\r\nwill need to actually be unique and at the very least required\r\n```javascript\r\nalias: { type: String, required: true, unique: true }\r\n```\r\n\r\nVotes could also be consolidated down to just a number:\r\n```javascript\r\nvotes: Number\r\n```\r\nBut I think I want to store the up and down votes for UI purposes."}}