Skip to content

Demo scenario: order history component #1483

@dhmlau

Description

@dhmlau

Description / Steps to reproduce / Feature proposal

As part of the e-commerce store demo scenario in #1476, this task is to create the order history component. Data related to user profile, stored in a database.

Taken from comment below

Acceptance Criteria

  • using the same GitHub demo app repo as User Profile component
  • Define Order model with the following properties:
    Model Relation: Customer has a hasMany relation with Order
    • order id (required)
    • customer email / id (required)
    • products (Array of product ids) (required)
    • total (optional)
  • Use Cloudant as the datasource, use a Docker image to run a Cloudant instance. Configure Travis CI to start a Cloudant docker instance of tests
  • Create Order controller that exposes REST APIs with endpoints:
    • Create new order
    • Return orders with a given customer id

Note: Implementation should come with test coverage and follow the best practices outlined in https://loopback.io/doc/en/lb4/Testing-your-application.html.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions