Skip to content
Snippets Groups Projects
Commit 22db8e39 authored by Michael Drury's avatar Michael Drury
Browse files

added comments for databases.py

parent 1e45e233
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,8 @@ from werkzeug.security import generate_password_hash, check_password_hash
from flask_login import UserMixin
from . import db
# Usertable which also stores the users wishlist and cart as a string of item ids split up by spaces
class User(UserMixin, db.Model):
__tablename__ = 'users'
id = db.Column(db.Integer, primary_key=True)
......@@ -34,7 +36,7 @@ class User(UserMixin, db.Model):
def __repr__(self):
return '<User {0}>'.format(self.username)
# stores all of the information for the projects
class product_table(db.Model):
__tablename__ = 'products'
product_id = db.Column(db.Integer, primary_key=True)
......@@ -53,6 +55,7 @@ class product_table(db.Model):
product_description = description_in))
db.session.commit()
# stores the reviews as well as the author of the review
class review_table(db.Model):
__tablename__ = 'reviews'
review_id = db.Column(db.Integer, primary_key=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment