Skip to content

Instantly share code, notes, and snippets.

@Richie97
Created February 1, 2012 19:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Richie97/1718963 to your computer and use it in GitHub Desktop.
Save Richie97/1718963 to your computer and use it in GitHub Desktop.
class CheckIn(db.Model):
__tablename__ = 'checkins'
id = db.Column(db.Integer, primary_key=True)
location_id = db.Column(db.Integer)
user_id = db.Column(db.Integer)
date = db.Column(db.DateTime)
def to_dict(self):
return{
'date':self.date,
'location': Location.query.get(self.location_id),
'user': User.query.get(self.user_id),
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment