コード例 #1
0
 /**
  * 有线网络设备
  * @return \yii\db\ActiveQuery
  */
 public function getDevice()
 {
     return $this->hasOne(DeviceInfo::className(), ["id" => "device_id"]);
 }
コード例 #2
0
 public function getRight()
 {
     return $this->hasOne(DeviceInfo::className(), ["id" => "rightDevice"]);
 }