model = new EctMetaEndoscope(); } public static function new(): static { return new self(); } /** * 通过 RFID 卡号查询内镜信息 * 同时匹配主卡号(endoscope_rfid)和备用卡号(rfid3) * * @param string $cardNo RFID 卡号(大写) * @return EctMetaEndoscope|null */ public function findByCardNo(string $cardNo): ?EctMetaEndoscope { $cardNo = strtoupper($cardNo); /** @var EctMetaEndoscope|null */ return EctMetaEndoscope::where('endoscope_rfid', $cardNo) ->orWhere('rfid3', $cardNo) ->first(); } }