/** * @return \yii\db\ActiveQuery */ public function getVehicle() { return $this->hasOne(VehicleInventory::className(), ['id' => 'vehicleId']); }
/** * @return \yii\db\ActiveQuery */ public function getVehicleInventories() { return $this->hasMany(VehicleInventory::className(), ['type' => 'id']); }