Created
January 30, 2019 22:23
-
-
Save jasonrhaas/320d9a4bd7a8233f3d1600f9e9c77920 to your computer and use it in GitHub Desktop.
Url model
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Url(db.Model): | |
id = db.Column(db.Integer, primary_key=True) | |
hash = db.Column(db.String(80), unique=True, nullable=False) | |
long = db.Column(db.Text(), nullable=False) | |
hits = db.Column(db.Numeric(), nullable=False, default=0) | |
def __repr__(self): | |
return '<Url %r>' % self.id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment