Skip to content

Hw19 tymofieieva#54

Open
NataTym wants to merge 3 commits intorusalforever:mongo_dbfrom
NataTym:HW19_Tymofieieva
Open

Hw19 tymofieieva#54
NataTym wants to merge 3 commits intorusalforever:mongo_dbfrom
NataTym:HW19_Tymofieieva

Conversation

@NataTym
Copy link
Copy Markdown

@NataTym NataTym commented Sep 8, 2025

No description provided.


class ProductAnalytics(Document):
product_id: int
visits: list[BaseProductAnalytics] = []
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

visits не потрібно

analytics = ProductAnalytics(product_id=product_id, timestamp=datetime.now(),
visits=[BaseProductAnalytics(timestamp=datetime.now())])

await analytics.insert()
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тобі треба кожного разу створювати новий запис ProductAnalytics:
product_id: Integer, ідентифікатор продукту.
timestamp: DateTime, час відвідування сторінки продукту.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants