initial commit: Proximity iOS app proposal, full Swift code scaffold, reference backend, testing docs, generated Xcode project
This commit is contained in:
33
Proximity/Models/UserProfile.swift
Normal file
33
Proximity/Models/UserProfile.swift
Normal file
@@ -0,0 +1,33 @@
|
||||
import Foundation
|
||||
|
||||
/// The user's own local identity and preferences.
|
||||
///
|
||||
/// Deliberately minimal: Proximity collects the *least* data needed to connect
|
||||
/// humans. There is no profile photo, no bio, no social graph import.
|
||||
struct UserProfile: Codable {
|
||||
var id: UUID
|
||||
var displayName: String
|
||||
var publicKey: Data
|
||||
|
||||
/// Master "open to connection" state.
|
||||
var isOpenToConnect: Bool
|
||||
|
||||
/// Preferred radius tier.
|
||||
var radiusTier: DistanceTier
|
||||
|
||||
/// When true, the user is present but invisible to others.
|
||||
var isIncognito: Bool
|
||||
|
||||
/// When true, the user is not discoverable at all.
|
||||
var isBlocked: Bool
|
||||
|
||||
static let empty = UserProfile(
|
||||
id: UUID(),
|
||||
displayName: "",
|
||||
publicKey: Data(),
|
||||
isOpenToConnect: false,
|
||||
radiusTier: .rightHere,
|
||||
isIncognito: false,
|
||||
isBlocked: false
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user