Project

General

Profile

Actions

Task #36

open

Favorites & View

Added by Dana Basheer about 2 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
High
Start date:
01/15/2026
Due date:
01/15/2026 (50 days late)
% Done:

0%

Estimated time:

Description

*Favorite / Unfavorite Ads
Allow users to save ads as favorites for quick access later and remove them when no longer needed.

*Track Ad Views
Record each time an ad is viewed to measure popularity and user engagement.

***Table: favorites

*id-INT (PK)-Unique favorite record ID

*user_id-INT (FK)-User who favorited the ad

*ad_id-INT (FK)-Favorited ad

*created_at-DATETIME-Time when ad was favorited

*Each record represents one user favoriting one ad.

*A unique constraint can be applied on (user_id, ad_id) to avoid duplicates.

*Used to display “My Favorites” section for users.

***Table: ad_views

*id-INT (PK)-Unique view ID

*ad_id-INT (FK)-Ad that was viewed

*viewer_user_id-INT-Viewing user (nullable)

*viewed_at-DATETIME-Time of view

*Each row represents one view of an ad.

*viewer_user_id is NULL for guest users.

*Helps calculate total views, popularity, and trending ads.

***Validations

*A user cannot favorite the same ad more than once.

*Only logged-in users can add or remove favorites.

*Favorite entries should be deleted when an ad is removed.

*Ad views should be counted every time the ad details page is opened.

*Duplicate views from the same user in a short time can be optionally filtered.

*Guest users may be tracked using IP address or session ID (optional).

Actions #1

Updated by Varsha Venugopal about 2 months ago

  • Status changed from New to In Progress
Actions #2

Updated by Varsha Venugopal about 2 months ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF