|
|
|
|
@ -18,4 +18,14 @@ class Settings: MicroStorable { |
|
|
|
|
var deviceId: String? = nil |
|
|
|
|
var lastSynchronization: String = "2000-01-01T00:00:00.000000Z" |
|
|
|
|
|
|
|
|
|
required init(from decoder: Decoder) throws { |
|
|
|
|
let container = try decoder.container(keyedBy: CodingKeys.self) |
|
|
|
|
|
|
|
|
|
userId = try container.decodeIfPresent(String.self, forKey: .userId) |
|
|
|
|
username = try container.decodeIfPresent(String.self, forKey: .username) |
|
|
|
|
deviceId = try container.decodeIfPresent(String.self, forKey: .deviceId) |
|
|
|
|
|
|
|
|
|
lastSynchronization = try container.decodeIfPresent(String.self, forKey: .lastSynchronization) ?? "2000-01-01T00:00:00.000000Z" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|