public function getApartment() { return $this->hasOne(Apartment::className(), ['id' => 'apartment_id']); }
public function getApartments() { return $this->hasMany(Apartment::className(), ['query_id' => 'id']); }