manikumarreddyu / AgroTech-AI

AgroTech AI platform is a comprehensive web-based tool where users can access various machine learning models for making accurate predictions related to agriculture
https://agro-tech-ai.vercel.app
MIT License
62 stars 99 forks source link

[Feature Request]: Connect Existing User Model for AgroShop E-commerce Platform #595

Closed IkkiOcean closed 3 days ago

IkkiOcean commented 4 days ago

Is there an existing issue for this?

Feature Description

Description: We need to connect the already existing user model for shop users to the AgroShop e-commerce platform. This will facilitate user management, authentication, cart management, and order history functionalities, ensuring a complete e-commerce experience.

Additional Keys to Consider: To enhance the user model for e-commerce functionalities, the following keys can be added:

  1. role: String (default: "customer")

    • Options: "customer", "admin"
    • Purpose: To differentiate between regular users and administrative users.
  2. address: Array of Objects

    • Structure:
      • street: String (required)
      • city: String (required)
      • state: String (required)
      • postalCode: String (required)
      • country: String (required)
      • isDefault: Boolean (default: false) - To mark the default shipping address.
    • Purpose: To store multiple shipping addresses for the user.
  3. phone: String (optional)

    • Purpose: To collect user contact information for order confirmations and support.
  4. createdAt: Date

    • Default: Date.now()
    • Purpose: To keep track of when the user registered.
  5. updatedAt: Date

    • Default: Date.now()
    • Purpose: To track the last update time of the user profile.
  6. isActive: Boolean (default: true)

    • Purpose: To indicate whether the user account is active or not.
  7. cart: Array of Objects

    • Structure:
      • productId: String (required) - ID of the product
      • quantity: Number (required) - Quantity of the product
      • price: Number (required) - Price of the product at the time of addition
      • addedAt: Date (default: Date.now()) - Time when the product was added to the cart
    • Purpose: To store items added to the user's cart.
  8. wishlist: Array of Objects

    • Structure:
      • productId: String (required) - ID of the product
      • addedAt: Date (default: Date.now()) - Time when the product was added to the wishlist
    • Purpose: To allow users to save products they are interested in for future reference.
  9. orderHistory: Array of Objects

    • Structure:
      • orderId: String (required) - Unique ID for the order
      • products: Array of Objects (required)
      • productId: String (required) - ID of the ordered product
      • quantity: Number (required) - Quantity of the product ordered
      • price: Number (required) - Price of the product at the time of order
      • totalAmount: Number (required) - Total amount for the order
      • orderDate: Date (required) - Date when the order was placed
      • status: String (default: "pending") - Current status of the order (e.g., "pending", "shipped", "delivered", "cancelled")
    • Purpose: To keep track of the user's past orders for reference.
  10. paymentMethods: Array of Objects

    • Structure:
      • method: String (required) - Type of payment method (e.g., "credit card", "PayPal", "bank transfer")
      • details: Object - Detailed information for the payment method (e.g., card number, expiration date)
    • Purpose: To store user's preferred payment methods for quicker checkout.

Use Case

Benefits

No response

Add ScreenShots

No response

Priority

High

Record

github-actions[bot] commented 4 days ago

Thank you for creating this issue! 🎉 We'll look into it as soon as possible. In the meantime, please make sure to provide all the necessary details and context. If you have any questions or additional information, feel free to add them here. Your contributions are highly appreciated! 😊

You can also check our CONTRIBUTING.md for guidelines on contributing to this project.

github-actions[bot] commented 3 days ago

Hello @IkkiOcean! Your issue #595 has been closed. Thank you for your contribution!