{"comment":{"url":"https://api.github.com/repos/ninomeza/Tbaytest/comments/9857639","html_url":"https://github.com/ninomeza/Tbaytest/commit/af17faf85016fd34891a48fbf063a0d49d85190b#commitcomment-9857639","id":9857639,"user":{"login":"miclovich","id":122275,"avatar_url":"https://avatars.githubusercontent.com/u/122275?v=3","gravatar_id":"","url":"https://api.github.com/users/miclovich","html_url":"https://github.com/miclovich","followers_url":"https://api.github.com/users/miclovich/followers","following_url":"https://api.github.com/users/miclovich/following{/other_user}","gists_url":"https://api.github.com/users/miclovich/gists{/gist_id}","starred_url":"https://api.github.com/users/miclovich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miclovich/subscriptions","organizations_url":"https://api.github.com/users/miclovich/orgs","repos_url":"https://api.github.com/users/miclovich/repos","events_url":"https://api.github.com/users/miclovich/events{/privacy}","received_events_url":"https://api.github.com/users/miclovich/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"af17faf85016fd34891a48fbf063a0d49d85190b","created_at":"2015-02-21T22:59:45Z","updated_at":"2015-02-21T22:59:45Z","body":"```python\r\nclass Item(Base):\r\n\t__tablename__ = \"items\"\r\n\tid = Column(Integer, primary_key=True)\r\n\tname = Column(String, nullable=False)\r\n\tdescription = Column(String)\r\n\tstart_time = Column(DateTime, default=datetime.utcnow)\r\n\tuser_id = Column(Integer, ForeignKey('user.id'), nullable=False)\r\n\tbids = relationship('Bid', backref='item')\r\n\r\n\r\nclass Bid(Base):\r\n\t__tablename__ = \"bids\"\r\n\r\n\tid = Column(Integer, primary_key=True)\r\n\tprice = Column (Integer, nullable=False)\r\n\tuser_id = Column(Integer, ForeignKey('user.id'), nullable=False)\r\n\titem_id = Column(Integer, ForeignKey('item.id'), nullable=False)\r\n\r\n\r\nclass User(Base):\r\n\t__tablename__ = \"user\"\r\n\r\n\tid = Column(Integer, primary_key=True)\r\n\tusername = Column(String, nullable=False)\r\n\tpassword = Column(String, nullable=False)\r\n\r\n\titems = relationship(\"Item\", backref=\"Item\")\r\n\tbids = relationship(\"Bid\", backref=\"Bid\")\r\n```"}}