# Entity Classification

---

**Document Version:** 1.0
**Project:** Student Bazaar
**Document Type:** Entity Classification Specification
**Status:** Approved
**Last Updated:** 28 June 2026
**Author:** Nemmi Tangha

---

# 1. Purpose

This document classifies all entities used in Student Bazaar according to their responsibilities within the system.

Rather than treating every database table equally, entities are grouped into logical domains. This improves maintainability, simplifies development, and helps future developers understand the architecture.

---

# 2. Entity Categories

The Student Bazaar database is divided into five primary categories:

* Core Entities
* Supporting Entities
* Administrative Entities
* Analytics Entities
* Future Entities

---

# 3. Core Entities

Core entities represent the primary business objects of the marketplace.

Without these entities, the application cannot function.

---

## User

Represents every registered account.

Responsibilities:

* Authentication
* Profile Management
* Buying
* Selling
* Messaging
* Notifications

---

## Category

Organizes marketplace products.

Examples:

* Electronics
* Books
* Furniture
* Clothing

---

## Listing

Represents products available for sale.

Responsible for:

* Product Information
* Seller Information
* Status
* Pricing
* Expiration

---

## Offer

Represents price negotiation between buyer and seller.

Responsible for:

* Initial Offer
* Counter Offers
* Final Accepted Price

---

## Conversation

Represents communication between buyer and seller regarding a specific listing.

---

## Message

Stores chat messages exchanged during conversations.

---

## Meet-up

Represents an agreed meeting after a successful negotiation.

---

# 4. Supporting Entities

Supporting entities extend the functionality of core entities.

---

## Listing Image

Stores product images.

Business Rule:

Minimum:

* 1 image

Maximum:

* 7 images

---

## Favorite

Stores products bookmarked by students.

---

## Notification

Stores marketplace notifications.

Examples:

* Messages
* Offers
* Meet-up Updates
* Listing Expiration

---

## Offer History

Maintains a complete history of price negotiations.

Every counter-offer is permanently stored.

---

## Premium Subscription

Stores subscription information.

Responsible for:

* Membership Status
* Expiration
* Premium Benefits

---

# 5. Administrative Entities

Administrative entities support platform management.

---

## Report

Stores reports submitted by students.

Supports moderation.

---

## Advertisement

Stores:

* Banner Advertisements
* Rewarded Advertisements

Managed by the Super Admin.

---

## Super Admin Log

Stores administrative actions.

Examples:

* User Suspension
* Listing Removal
* Advertisement Updates

---

# 6. Analytics

Version 1 stores basic marketplace analytics directly within the `listings` table instead of using a dedicated analytics table.

Current analytics include:

- View Count
- Favorite Count
- Offer Count

This approach keeps the database simple while providing efficient statistics for the Seller Dashboard and marketplace insights.

If detailed event tracking becomes necessary in future versions, a dedicated analytics module can be introduced without affecting the existing database architecture.

---

# 7. Future Entities

These entities are intentionally excluded from Version 1.

Potential future additions include:

* Payment Transaction
* Delivery Tracking
* AI Recommendation
* QR Verification
* College Verification
* Push Notification Device
* Mobile Session

---

# 8. Entity Dependency

The system follows a layered dependency model.

Core Entities

↓

Supporting Entities

↓

Administrative & Analytics Entities

Future entities must integrate without modifying the core architecture.

---

# 9. Design Principles

The entity model follows these principles:

* High Cohesion
* Low Coupling
* Normalized Database Design
* Referential Integrity
* Scalability
* Maintainability
* Separation of Responsibilities

---

# 10. Summary

The Student Bazaar entity model consists of:

### Core Entities (7)

* User
* Category
* Listing
* Offer
* Conversation
* Message
* Meet-up

---

### Supporting Entities (5)

* Listing Image
* Favorite
* Notification
* Offer History
* Premium Subscription

---

### Administrative Entities (3)

* Report
* Advertisement
* Super Admin Log

---

### Analytics Entity (1)

* Listing View

---

### Future Entities

Reserved for future versions without affecting the Version 1 architecture.

---

# 11. Conclusion

This classification provides a structured overview of the Student Bazaar data model and serves as a reference for database implementation, system architecture, API development, and future project expansion.
