Skip to content

๐Ÿš€ GoStack TypeORM Relations challenge getting deep into database relations

Notifications You must be signed in to change notification settings

lucasmsa/GoStack-database-relations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

GoStack Challenges ๐Ÿ“ƒ

GoStack is an 8-week Bootcamp from RocketSeat that is mainly focused on teaching NodeJS, ReactJS, React-Native and Typescript


Challenge

  • Post / costumers route will receive the user's email and name, returning this new user at the end.
    • If a client with the same email already exists throw an error
    • customers table on the db must have name, email, created_at and update_at
  • Post / products route will receive the user's name,price and quantity
    • If a product with the same name already exists throw an error
    • products table on the db must have name, price, quantity, created_at and update_at
      • To add price to the db use the type as decimal, also passing the properties precision and scale
  • Post / orders route will receive costumer_id and an array of products, containing the id and the quantity you want to add to a new order
    • Add to the order table a new order related to the costumer_id, while also containing the fields created_at and updated_at
    • Inside the orders_products table store the product_id, order_id, price, quantity, created_at and updated_at
      • Create a relationship N:N between orders and products
  • GET /orders/:id route returns info about a specific order

About

๐Ÿš€ GoStack TypeORM Relations challenge getting deep into database relations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published