16 lines
297 B
Swift
16 lines
297 B
Swift
import Foundation
|
|
|
|
nonisolated(unsafe)
|
|
struct UserProfile: Codable, Sendable {
|
|
static let storageKeyName = "user_profile.json"
|
|
|
|
let name: String
|
|
let email: String
|
|
let age: Int?
|
|
let createdAt: Date
|
|
|
|
var ageDescription: String {
|
|
age.map(String.init) ?? "n/a"
|
|
}
|
|
}
|