GithubHelp home page GithubHelp logo

bar_raiser's Introduction

The following assignment was created for barraiser interview, Please do not copy paste and if you do please make sure to change the readme file.

How to run:

  1. clone project
  2. cd to project directory
  3. create and activate virtual environment
  4. run 'pip install -r requirements.txt'
  5. run 'python3 manage.py makemigrations'
  6. run 'python3 manage.py migrate'
  7. create sample users and products for testing
  8. run 'python3 managy.py runserver'

Assumptions:

  1. one deal only has one product
  2. date format = yyyy-mm-dd hh:mm:ss

Validations:

  1. complete data check
  2. offer time check( start time > end time)
  3. date format check
  4. Deal duplicity check ( not 2 deals can have same product)

Payloads:

  1. Deal Creation Payload: { "product_id":2, "start":"2021-09-10 23:30:00", "end":"2021-09-09 23:30:00", "max":2 }

  2. Deal Deletion Payload:

{ "deal_id":2, }

  1. Deal claim Payload: { "user_id":2, "deal_id":1, }

  2. Deal Update Payload: { "deal_id":1 "product_id":3, "start":"2021-09-10 23:30:00", "end":"2021-09-09 23:30:00", "max":2 }

bar_raiser's People

Contributors

cph0r 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.