hasOne(Prescription::class, ['id' => 'original_prescription_id']); } /** * 关联转诊诊所(西医诊所) */ public function getTransferStore() { return $this->hasOne(Store::class, ['id' => 'transfer_store_id']); } /** * 关联委托诊所(中医诊所) */ public function getDelegateStore() { return $this->hasOne(Store::class, ['id' => 'delegate_store_id']); } }