Skip to content

Instantly share code, notes, and snippets.

@sgoodwin
Forked from projectxcappe/API_Doc.swift
Last active March 21, 2018 19:08
Show Gist options
  • Save sgoodwin/0371dceeefb92b5d761febff0126f608 to your computer and use it in GitHub Desktop.
Save sgoodwin/0371dceeefb92b5d761febff0126f608 to your computer and use it in GitHub Desktop.
API_Doc.swift
//Login
Login {
let email: String
let fb_id: String //when fb is implemented
let password: String
let password_reset_code: String
let phone_number: String
let user_id: String
}
//Sign Up
SignUp {
let token: String
}
//Password
ForgotPassword {
let email: String
//Venue and Places and Menu
Venue //Like Pepsi Center
{
let longitude: Double
let latitude: Double
let venue_id: Int
let venue_tax_rate: Double
let name: String
let places_count: Int
let address: String
let close_time: String
let open_time: String
let phone_number: String
let image: URL
let venue_map: URL
let places:[Place]
}
Place //Like Concession Stand
{
let venue_id: String
let place_id: String
let est_venue_order_time: String
let longitude: Double
let latitude: Double
let name: String
let description: String
let image: URL
let open_time: String
let close_time: String
let location: String //113, 127 etc sections or whatever it is for the venue
let menu: [Category]
}
Category //Like Burgers, Desserts, Salads...
{
let name: String
let food: [Food]
}
Food //Like Popcorn
{
let food_id: String
let name: String
let description: String
let price: Double
let image: String
}
//Payment
PaymentCards //CRUD
{
let cards: [Card]
}
Card
{
var card_id: String
var user_id: String //this comes from registration
var card_number: String
var card_holder_name: String
var address: String
var apt: String
var city: String
var state: String
var zip_code: String
var cvv: String
var nickname: String
var exp_month: String
var exp_year: String
}
//Order
AddOrder {
let order_id: Int
let user_id: Int
let venue_id: Int
let time: String //Date
let total: Double
let order_detail: [Order]
}
Order {
let order_id: Int
let food_id: Int
let price: Double
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment