diff --git a/MVMCore/MVMCore/Utility/PropertyWrappers/DecodableDefault.swift b/MVMCore/MVMCore/Utility/PropertyWrappers/DecodableDefault.swift index b891942..9d1bb69 100644 --- a/MVMCore/MVMCore/Utility/PropertyWrappers/DecodableDefault.swift +++ b/MVMCore/MVMCore/Utility/PropertyWrappers/DecodableDefault.swift @@ -65,6 +65,10 @@ extension DecodableDefault { public enum EmptyMap: Source { public static var defaultValue: T { [:] } } + + public struct UUIDStringSource: DecodableDefaultSource { + public static var defaultValue: String { UUID().uuidString } + } } } @@ -74,6 +78,7 @@ extension DecodableDefault { public typealias EmptyString = Wrapper public typealias EmptyList = Wrapper> public typealias EmptyMap = Wrapper> + public typealias UUIDString = Wrapper } extension DecodableDefault.Wrapper: Equatable where Value: Equatable {}