Giter Site home page Giter Site logo

alten-code-job's Introduction

Getting Started

Reference Documentation

For further reference, please consider the following sections:

Guides

The following guides illustrate how to use some features concretely:

Additional Links

These additional references should also help you:

OpenAPI - Swagger-ui

API calls examples

H2

http://localhost:8080/h2-console

  • jdbc:h2:mem:prices;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
  • sa

img.png

Alten code job assessment

In the company's e-commerce database we have the PRICES table that reflects the final price (pvp) and the rate that applies to a product from a chain between certain dates. Below is an example of the table with the relevant fields

PRICES TABLE

img.png

PRICES TABLE FIEDS

  • BRAND_ID: brand foreign key (1 = ZARA)
  • START_DATE, END_DATE: date ranges to apply the indicated price rate
  • PRICE_LIST: Applicable price rate identifier
  • PRODUCT_ID: Product code identifier
  • PRIORITY: If two rates coincide in a range of dates, the one with the highest priority (greatest numerical value) is applied.
  • PRICE: final price
  • CURR: iso currency

TODO

  • Build an application/service in SpringBoot that provides a query rest end point such that it accepts as input parameters
    • application date, product identifier, brand identifier
  • Output data
    • product identifier, brand identifier, prices rate to apply, dates of application and final price
  • H2 as mem database

TESTS

  • Test 1: Request at 10:00 2020/06/14 product id 35455 brand id 1 (ZARA)
  • Test 2: Request at 16:00 2020/06/14 product id 35455 brand id 1 (ZARA)
  • Test 3: Request at 21:00 2020/06/14 product id 35455 brand id 1 (ZARA)
  • Test 4: Request at 10:00 2020/06/15 product id 35455 brand id 1 (ZARA)
  • Test 5: Request at 21:00 2020/06/16 product id 35455 brand id 1 (ZARA)

alten-code-job's People

Contributors

serge-svg avatar

Watchers

 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.