self.updatedAt = Date() self._ref = type(of: self).databaseRef.childByAutoId() self.id = self._ref.key super.init() } /// Initialize Object from snapshot. convenience required public init?(snapshot: DataSnapshot) { self.init() _setSnapshot(snapshot) } /// Initialize the object with the specified ID. convenience required public init?(id: String) { self.init() self.id = id self._ref = type(of: self).databaseRef.child(id) }