Created
July 18, 2019 14:35
-
-
Save istx25/d44dd990c1ce6ef5fc1ee7f9cc633d19 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Checkin.swift | |
// Created by Luna Graysen on 2019-05-01. | |
// Copyright © 2019 Luna Graysen. All rights reserved. | |
// | |
import Foundation | |
struct Checkin { | |
// Unique Id for each check-in | |
// TODO: Need to choose strategy for generating these | |
let id: String | |
// String representation of the date when a Checkin was created | |
// `2019-04-30 08:59:49 -4` | |
let date: String | |
// Offset in minutes between when this check-in occured local time and the same time in UTC | |
// `-400` | |
let timeZoneOffset: String | |
// Reference to Place object | |
let place: Place | |
// Reference to User who checked-in | |
let user: User | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Place.swift | |
// Created by Luna Graysen on 2019-05-01. | |
// Copyright © 2019 Luna Graysen. All rights reserved. | |
// | |
import Foundation | |
struct Place { | |
// To define where a Place is physically located | |
struct Location { | |
// `50 Mont-Royal Ave W` | |
let address: String | |
// `Montreal` | |
let city: String | |
// `QC` | |
let province: String | |
// `Canada` | |
let country: String | |
// `H2T2S3` | |
let postalCode: String | |
// `[50 Mont-Royal Ave W], | |
// [Montreal, QC H2T2S3], | |
// [Canada]` | |
let formattedAddress: [String] | |
// `45.5187257` | |
let latitude: Double | |
// `-73.588982` | |
let longitude: Double | |
} | |
// Unique Id for each Place | |
// TODO: Need to choose strategy for generating these | |
let id: String | |
// `Provigo` | |
let name: String | |
// `5148498028` | |
let phoneNumber: String? = nil | |
// `www.provigo.ca` | |
let url: String? = nil | |
// See Location struct | |
let location: Location | |
// `true` hosted remotely; `false` hosted on-device or on personal server | |
let isPublic: Bool | |
// String representation of the date when a Place was created | |
// `2019-04-30 08:59:49 -4` | |
let createdAt: String | |
// Anonymized number of checkins Place has | |
// `1842` | |
let checkinsCount: Int | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// User.swift | |
// Created by Luna Graysen on 2019-05-01. | |
// Copyright © 2019 Luna Graysen. All rights reserved. | |
// | |
import Foundation | |
struct User { | |
// Unique Id for each User | |
// TODO: Need to choose strategy for generating these | |
let id: String | |
// First name of User | |
// `Luna` | |
let firstName: String | |
// Last name of User | |
// `Graysen` | |
let lastName: String | |
// String representation of user's gender, can be nil | |
// `non-binary` | |
let gender: String? = nil | |
// User's pronouns | |
// `[subject, object, possessive-determiner, possessive-pronoun, reflexive]` | |
// `[they, them, their, theirs, themselves]` | |
let pronouns: [String] | |
// String representation of the date when a User was created | |
// `2019-04-30 08:59:49 -4` | |
let createdAt: String | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment