Added ability for stats to be tracked on products
This commit is contained in:
21
models/stats.py
Normal file
21
models/stats.py
Normal file
@ -0,0 +1,21 @@
|
||||
from datetime import datetime
|
||||
|
||||
from models.users.user import User
|
||||
from models.products.product import Product
|
||||
|
||||
|
||||
class Stats:
|
||||
|
||||
def __init__(self):
|
||||
""" Constructor for a Stat object """
|
||||
self.id = 0
|
||||
self.userID = 0
|
||||
self.productID = 0
|
||||
self.viewDate = datetime.now()
|
||||
|
||||
def __init__(self, product_id: int, user_id: int):
|
||||
""" Construct a view with the user and product class """
|
||||
self.id = 0
|
||||
self.userID = user_id
|
||||
self.productID = product_id
|
||||
self.viewDate = datetime.now()
|
Reference in New Issue
Block a user