Coder Social home page Coder Social logo

pet-shop's Introduction

Create puppy shop

shop has many puppys

puppy belongs to shop

customer has many puppies puppy belongs to customer

  • puppy has a name, breed and age

  • shop has a name, location, puppies=[]

  • customer has a name, location, puppies=[]

  • customer can only buy puppies from shops with the same location (location matching)

  • when puppy is sold, it changes it’s ownership - aka does not belong to shop, but belongs to customer

  • shop, customer -> users

    • roles (0 -> shop, 1 -> customer)

  • puppy/user -> index/show/edit

  • customer buys a puppy

    • puppy no longer belongs to shop

tests:

* model tests:
  * user: if they have no puppies, user.puppies should return []
          if they sell a puppy, they should have one less puppy
  * puppy: should belong to a shop/customer
          when a puppy is sold, change the owner

* feature tests:
  * index page for a user should display all of their puppies
    2ndary
    * index page should have an 'edit' button for the puppies so they can change the name
    * index page should have an 'edit' button for the puppies - But they cannot change the age or breed

  * sell a puppy
    * create a view (root) where all the puppies are displayed
    * if the puppy does not belong to you (whatever the current user is) it has a "buy" button

    $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
    0 shop owner shop_owner has shop id
    puppies being sold - change of ownership (shop to customer)
    add price to puppy (sales, ranges, (20% off certain breed) rank puppies(on index))

    current shop owner(admin page)

pet-shop's People

Contributors

draganovic avatar

Watchers

James Cloos 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.