Added ability to fetch products from the database

This commit is contained in:
2024-01-05 18:20:56 +00:00
parent 9fbdb9f3fb
commit 868876b98e
11 changed files with 261 additions and 156 deletions

View File

@ -1,22 +1,17 @@
from abc import ABC
from datetime import datetime
class Product(ABC):
class Product:
'''
Base class for a product
'''
def __init__(self):
self.productID = 0
self.id = 0
self.name = ""
self.image = "/static/assets/wmgzon.png"
self.description = ""
self.cost = 0.0
self.category = ""
self.sellerID = 0
self.postedDate = datetime.now()
self.quantityAvailable = 0
def addToBasket():
pass
def buyProduct():
pass