id); } /** * 判断操作员信息是否完整有效 */ public function isValid(): bool { return !empty($this->id) && !empty($this->name) && !empty($this->rfid); } /** * 转换为数组 */ public function toArray(): array { return [ 'id' => $this->id, 'name' => $this->name, 'rfid' => $this->rfid, ]; } }