USER
| Field | Field | Description |
|---|---|---|
| _id | ObjectId | Unique identifier for each user. |
| name | String | User's name. |
| username | String | User's chosen username. |
| String | User's email address. | |
| address | String | User’s address |
| password | String | Encrypted user password. |
| profile_pic | String | URL or path to the user's profile picture. |
| phoneNumber | Number | User’s phone number |
| bio | String | User's biography or description. |
| createdAt | Timestamp | Timestamp indicating user creation. |
| updatedAt | Timestamp | Timestamp indicating last update |
| isLogin | Boolean | To identify current status |
| isBlocked | Boolean | Indicates if the user is blocked |
ORDERS
| Field | Field | Description |
|---|---|---|
| _id | ObjectId | Unique identifier for each user. |
| userId | Object Id | Reference to Users Collection |
| totalItems | Number | Total items purchased. If it has more quantity it will also count. |
| purchaseDate | Date | Date of purchase |
| totalPrice | Number | Total amount. |
PAYMENTS
| Field | Field | Description |
|---|---|---|
| _id | ObjectId | Unique identifier |
| orderId | ObjectId | Reference to Orders Collection |
| userId | ObjectId | Reference to Users Collection |
| paymentDate | Date | Date of the payment |
| amount | Number | Amount paid |
| status | String | Payment status (e.g., paid, pending, failed, refunded, etc.) |
| createdAt | Timestamp | Timestamp indicating payment creation |
| updatedAt | Timestamp | Timestamp indicating last update |
SUPPLIER USER
| Field | Field | Description |
|---|---|---|
| _id | ObjectId | Unique identifier |
| name | String | Supplier's name |
| String | Supplier's email address | |
| phoneNumber | Number | Supplier's phone number |
| productsSupplied | String | Products supplied by the supplier |
| createdAt | Timestamp | Timestamp indicating supplier creation |
| updatedAt | Timestamp | Timestamp indicating last update |
DELIVERY
| Field | Field | Description |
|---|---|---|
| _id | ObjectId | Unique identifier |
| orderId | ObjectId | Reference to Orders Collection |
| deliveryPerson | String | Name of the delivery person |
| deliveryAddress | String | Delivery address |
| deliveryDate | Date | Date of delivery |
| status | String | Delivery status (e.g., pending, in transit, delivered, etc.) |
| createdAt | Timestamp | Timestamp indicating delivery creation |
| updatedAt | Timestamp | Timestamp indicating last update |
ADMIN
| Field | Field | Description |
|---|---|---|
| _id | ObjectId | Unique identifier |
| name | String | Admin name |
| String | Admin email | |
| password | String | Admin password |
| createdAt | Timestamb | Timestamp indicating admin creation |
| updatedAt | Timestamb | Timestamp indicating last update |