Skip to content

Instantly share code, notes, and snippets.

@farzadshbfn
Last active September 14, 2018 10:18
Show Gist options
  • Save farzadshbfn/0ca98aab9acc04906ce829dbdf7c0229 to your computer and use it in GitHub Desktop.
Save farzadshbfn/0ca98aab9acc04906ce829dbdf7c0229 to your computer and use it in GitHub Desktop.
struct Email {
let address: String
/** Or instead of saving the address, extract it on initliazation to localPort@domain
* and generate address everytime someone tries to access it?
* the thing is, we can do that in future, without changing the public API.
*/
// let domain: String
// let localPart: String
}
struct CellNumber {
let digits: String
/** Same thing goes for CellNumber, instead of storing digits,
* store {Country Code}-{Area Code}-{Destination} part
* and generate digits everytime someone tries to access it.
*/
// let countryCode: String?
// let areaCode: String
// let destination: String
}
struct UserProfile {
let name: String
let lastName: String
let cellNumber: CellNumber
let email: Email?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment