-
-
Save fitomad/da8b4177bc9b8760eb2b2dec218f1594 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public struct Memento | |
{ | |
/// Stock disponible de iPhone | |
public let iPhoneStock: Int | |
/// Stock disponible de iPad | |
public let iPadStock: Int | |
/// Stock disponible de la familia Mac | |
public let macStock: Int | |
/// Stock disponible de Apple TV | |
public let tvStock: Int | |
/// Momento en el que se crea el *snapshot* de la tienda | |
private let createdAt: Date | |
/** | |
Crea un *snapshot* con las existencias de la tienda | |
*/ | |
public init(stockForiPhone iPhone: Int, iPad: Int, mac: Int, tv: Int) | |
{ | |
self.createdAt = Date() | |
self.iPhoneStock = iPhone | |
self.iPadStock = iPad | |
self.macStock = mac | |
self.tvStock = tv | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment