Git Product home page Git Product logo

events's Introduction

README

  • Ruby version - 2.3.3

  • Ruby version - 4.2.6

  • System Dependencies

    • bundle install (to install all the Gems and dependencies)

    • rake db:migrate (to install migrations)

    • rails server (to run the rails app)

  • Database

    • SQLite

  • To run the test suite

    • rake test (To run all the test cases)

  • Assumptions made in the algorithm

    • Event will have start and end date in the same day

    • Multiple opening entries is possible in a day E.g [9 - 10:30], [12 - 3:30]

    • Appointment is created only on available slots

    • Each slot is of a 30 min duration

  • TASK

    • Write an algorithm that checks the availabilities and return the next 7 days available slots of a doctor.

    • Input is a date

    • Output 7 days available slots

    • They are two kinds of events:

      • ‘opening’, are the openings for a specific day and they can be reccuring week by week.

      • ‘appointment’, times when the doctor is already booked.

    • Sample Event Model

      • rails g model event starts_at:datetime ends_at:datetime kind:string weekly_recurring:boolean

events's People

Contributors

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