Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define Models #5

Open
C-4PO opened this issue Jul 30, 2017 · 3 comments
Open

Define Models #5

C-4PO opened this issue Jul 30, 2017 · 3 comments
Assignees

Comments

@C-4PO
Copy link
Owner

C-4PO commented Jul 30, 2017

  • Item Class
  • Drink Class ?
  • Ingedient Class
  • Recipie Class
  • Size Class
  • Order Class
  • User Class
  • Info Class
@C-4PO
Copy link
Owner Author

C-4PO commented Jul 30, 2017

Item Class

  • Represents an item for sale by the
  • Contains Ingredient Class Array
  • Max Ingredients?
  • Contains Recipie Class
    • An Optional as either Null or a recipie
  • Contains Size
    • Weight class like XL , L , M, ... and associated size in ml
    • Might add specifically to drink class or atleast overwrite it
  • Tempurature
    • So far just enum of hot or cold
  • Price
    • Computed Recipie price / of sum ingredient price
    • Recipie price precedence
  • Name
    • Computed from Recipie or Custom
  • Description
    • From Recipie
  • Type
    • Type of item either being drink or food
    • Subclassing maybe?
  • CheckRecipie()
    • Checks If ingredients are recipie compliant
    • If not, searches for new reciepie
      • If None Found, cite as cutom / recipie "modified"
      • Additional ingredients might lead to Different Recipie
    • Checked after every addition / removal of an ingredient
  • AddIngredient()
    • Adds sign ingredient input into item array
    • Takes ingredient string keys and searches Ingedient Store
  • RemoveIngredient()
    • Reacts to remove event and removes ingredient
  • AddRecipie()
    • Takes in a recipie
    • Removes other recipie ingredients (base ingredients)
    • Using recipie key strings used Ingredient store and adds to ingredient array
  • RemoveRecipie()
    • Removes Ingredients that are base of the recipie
    • private as helper for Add Recipie

@C-4PO
Copy link
Owner Author

C-4PO commented Jul 30, 2017

Recipie Class

  • Name
  • Description
  • Price
  • AddOn Limit?
    • This Price takes precendence over ingredient price sum
    • Extra ingredients add to the overall price
      • Taken Care of in Item Class
  • RecipieStyle Object
    • Contains UI stlyes applied when Recipie is selected
  • isSelected ?
    • computed boolean if in Item is in Current Item Object
  • Required Ingredients
    • List of Ingredient Key Strings
  • isRecipie()
    • Takes array of ingredients
    • Returns number of ingredients if match, 0 otherwise
      • Ingredients might match multiple recipies but the recipie that has the most of them will be picked
  • UnSuppotedIngredients ?

If ingredients are not avalible either show disabled or not show at all

@C-4PO
Copy link
Owner Author

C-4PO commented Jul 30, 2017

Ingredient Class

  • Name
  • Description
  • Price
  • isSelected
    • If in the current Item
  • Type
    • Enum value of what that ingredient contributes to the item
    • Base Type
      • One of the main ingredients of a recipe
    • AddOn Type
      • General ingredients universal to most drinks like cream and suger
  • Ingredient Style
    • Icon / Image
      • Used For Ingredient Listing
    • Pattern / substance depiction image
      • Used for drink depiction on UI

If an ingredient is not avaliable not returned from api!

@C-4PO C-4PO self-assigned this Jul 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant