Added the database

This commit is contained in:
xemeds
2020-07-20 14:55:19 +00:00
parent 3decaae628
commit b203622ad5
4 changed files with 9 additions and 7 deletions
+6 -4
View File
@@ -1,7 +1,9 @@
from tiny0 import db
'''
class URL(db.Model):
id = db.Column(db.Integer, primary_key=True)
token = db.Column(db.String(8), index=True, unique=True, nullable=False)
url = db.Column(db.String(2000), nullable=False)
Declaration of models
'''
def __repr__(self):
return f"'{self.id}' '{self.token}' '{self.url}'"