2024-01-30 21:49:17 +00:00
|
|
|
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
|
2024-02-01 01:44:02 +00:00
|
|
|
self.viewDate: datetime = datetime.now()
|
2024-01-30 21:49:17 +00:00
|
|
|
|
|
|
|
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()
|