WMGZON/models/stats.py

22 lines
562 B
Python
Raw Normal View History

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 = 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()