Products: 2. Brands
Products: 2. Brands
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]