|
|
|
@ -71,7 +71,7 @@ class Purchase: ModelObject, Storable { |
|
|
|
self.user = try container.decodeEncrypted(key: .user) |
|
|
|
self.user = try container.decodeEncrypted(key: .user) |
|
|
|
self.purchaseDate = try container.decode(Date.self, forKey: .purchaseDate) |
|
|
|
self.purchaseDate = try container.decode(Date.self, forKey: .purchaseDate) |
|
|
|
self.productId = try container.decode(String.self, forKey: .productId) |
|
|
|
self.productId = try container.decode(String.self, forKey: .productId) |
|
|
|
self.quantity = try container.decode(Int.self, forKey: .quantity) |
|
|
|
self.quantity = try container.decodeIfPresent(Int.self, forKey: .quantity) |
|
|
|
self.revocationDate = try container.decodeIfPresent(Date.self, forKey: .revocationDate) |
|
|
|
self.revocationDate = try container.decodeIfPresent(Date.self, forKey: .revocationDate) |
|
|
|
self.expirationDate = try container.decodeIfPresent(Date.self, forKey: .expirationDate) |
|
|
|
self.expirationDate = try container.decodeIfPresent(Date.self, forKey: .expirationDate) |
|
|
|
} |
|
|
|
} |
|
|
|
|