generated from CMU-17-356/dronut-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
ODM
Alex Li edited this page Feb 5, 2022
·
11 revisions
Drone Object
{
"id" : Integer, // Unique drone ID
"charge" : Float, // Remaining charge % [0,100]
}
User Object
{
"username" : String, // Unique
"password" : String, // Hashed password
"full_name" : String,
"previous_orders": [Doughnut] // List of donuts they've ordered
"employee" : Boolean, // Boolean for whether user is an employee
}
Doughnut Object
{
"name" : String, // Unique doughnut name
"price" : Float, // Float representation of price
"description" : String, // Longer description of doughnut
}
Order Object
{
"user" : User, // User
"price" : Float, // Float representation of price
"doughnuts" : [Doughnut], // List of ordered doughnuts
"destination" : String, // Longer description of doughnut
}
Drone Object
{
"id" : 2,
"charge" : 98,
}
User Object
{
"username" : "ricksanchez"
"password" : "longrandomhash"
"previous_orders": [
{
"name" : "Chocolate",
"price" : 1.99
"description" : "A nice big chocolate doughnut."
}: 2
,
]
}
Doughnut Object
{
"name" : "Chocolate",
"price" : 1.99
"description" : "A nice big chocolate doughnut."
}
Order Object
{
"user" : {
"username" : "ricksanchez"
"password" : "longrandomhash"
"previous_orders": []
}, // User
"price" : 2.03, // Float representation of price
"doughnuts" : [{
"name" : "Chocolate",
"price" : 1.99
"description" : "A nice big chocolate doughnut."
}], // List of ordered doughnuts
"destination" : "4500 Centre Ave, Pittsburgh, PA 15213"
}