isInStorage; } /** * 判断是否已出库 */ public function isTakenOut(): bool { return !$this->isInStorage && $this->lastAction === '内镜取出'; } /** * 转换为数组 */ public function toArray(): array { return [ 'isInStorage' => $this->isInStorage, 'lastAction' => $this->lastAction, 'inTime' => $this->inTime, ]; } }