Advertisement
Guest User

Untitled

a guest
Feb 11th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.68 KB | None | 0 0
  1. struct Instruction {
  2.     number: Int
  3.     text: String
  4.     videos: [VideoURL]
  5.     allowsRecording: Bool
  6.     time: TimeInterval?
  7. }
  8.  
  9. struct Ingredient {
  10.     quantity: Int
  11.     unit: String
  12.     name: String
  13.     other: String?
  14.     comment: String?
  15.     input: String
  16. }
  17.  
  18. enum RecipeTag {
  19.     vegan, vege, halal, pescatarian...
  20. }
  21.  
  22. struct Recipe {
  23.     source: URL
  24.     instructions: [Instruction]
  25.     ingredients: [Ingredient]
  26.     photo: Image?
  27.     time: TimeInterval?
  28.     tags: [RecipeTag]
  29.     servings: Int? // if doesn't exist, assume 1 serving
  30.     difficulty: Double // percentage???
  31. }
  32.  
  33. struct User {
  34.     name: String
  35.     username: String
  36.     email: String
  37.     password: String
  38.     recipes: [Recipe]
  39.     experience: Double // percentage
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement