Code Monkey home page Code Monkey logo

shakuro_test_project's Introduction

Test exam for backend developer position

Requirements.

  • Publishers produce books that are sold in shops.
  • A book can be distributed via multiple shops.
  • A shop can sell multiple copies of a book. .

What should to be done

Please model the required database relations and create API Endpoints described below. The code should be covered with tests (rspec).

Endpoint 1

for a specific Publisher it should return the list of shops selling at least one book of that publisher. Shops should be ordered by the number of books sold. Each shop should include the list of Publisher’s books that are currently in stock.

Example response:

{
  shops:[
   {
     “id”: 1,
     “name”: “Amazon”,
     “books_sold_count”: 10,
     “books_in_stock”: [
       {
         “id”: 2,
         “title”: “Yiddish songs”,
         “copies_in_stock”: 3
       },
       
     ]
   },
   
 ]
}

Endpoint 2

For a specific Shop it should mark one or multiple copies of a book as sold.

Comments

Please upload your code to github repository, there is no need in ZIP archives or smth, please send us link to you solution pubslihed on https://github.com .

If you have any questions - please dont hesitate to ask contact who shared this test with you.

shakuro_test_project's People

Contributors

sergejovsiannikov avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.