0% found this document useful (0 votes)
5 views5 pages

Products: 2. Brands

The document outlines the structure of various entities in an e-commerce database, including Products, Brands, Categories, Orders, Customers, Reviews, Coupons, Cart, Users, Transactions, and Wishlists. Each entity has specific fields such as IDs, names, prices, and timestamps. This schema is designed to manage product listings, customer interactions, and transaction processes.

Uploaded by

minhngoc00099
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views5 pages

Products: 2. Brands

The document outlines the structure of various entities in an e-commerce database, including Products, Brands, Categories, Orders, Customers, Reviews, Coupons, Cart, Users, Transactions, and Wishlists. Each entity has specific fields such as IDs, names, prices, and timestamps. This schema is designed to manage product listings, customer interactions, and transaction processes.

Uploaded by

minhngoc00099
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

1.

Products
{

"_id": ObjectId(),

"name": String,

"brand_id": ObjectId,

"category_id": ObjectId,

"price": Number,

"discount": Number,

"stock": Number,

"images": [String],

"specifications": {

"screen": String,

"chipset": String,

"ram": String,

"storage": String,

"camera": {

"rear": String,

"front": String

},

"battery": String,

"os": String

},

"created_at": ISODate,

"updated_at": ISODate

2. Brands
{

"_id": ObjectId(),
"name": String,

"country": String,

"website": String

3. categories
{ "_id": ObjectId(),

"name": String,

"description": String }

4. orders
{

"_id": ObjectId(),

"customer_id": ObjectId,

"items": [

"product_id": ObjectId,

"quantity": Number,

"price": Number,

"discount": Number

],

"total_price": Number,

"status": String,

"payment_method": String,

"created_at": ISODate,

"updated_at": ISODate

5. customers
{
"_id": ObjectId(),

"name": String,

"email": String,

"phone": String,

"address": String,

"created_at": ISODate

6. reviews
{

"_id": ObjectId(),

"product_id": ObjectId,

"customer_id": ObjectId,

"rating": Number,

"comment": String,

"created_at": ISODate

7. coupons

"_id": ObjectId(),

"code": String,

"discount": Number,

"start_date": ISODate,

"end_date": ISODate,

"usage_limit": Number,

"used_count": Number

8. cart
{
"_id": ObjectId(),

"customer_id": ObjectId,

"items": [

"product_id": ObjectId,

"quantity": Number,

"price": Number

],

"created_at": ISODate,

"updated_at": ISODate

9. users
{

"_id": ObjectId(),

"username": String,

"password": String,

"role": String,

"created_at": ISODate

10. transactions

"_id": ObjectId(),

"order_id": ObjectId,

"customer_id": ObjectId,

"payment_method": String,

"transaction_status": String,

"amount": Number,
"created_at": ISODate

11. wishlists
{

"_id": ObjectId(),

"customer_id": ObjectId,

"products": [ObjectId]

You might also like