Add __sleep() and __wakeup() methods for models