Fact improvements & helpers
-
Add FactTypeenum model with known (.username,.email,.phone) and unknown (.other(Int)) types of facts. -
Update Factmodel properties:-
type: Int→type: FactType -
fact: String→value: String
-
-
Add convenience extensions to [Fact]array:func get(_ type: FactType) -> Fact?func set(_ type: FactType, _ value: String?)
-
Add convenience extensions to Contactmodel:func getFact(_ type: FactType) throws -> Fact?mutating func setFact(_ type: FactType, _ value: String?) throws
Edited by Dariusz Rybicki