true, 'targetClass' => FixCarPart::className(), 'targetAttribute' => ['part_id' => 'id']], [['store_room_id'], 'exist', 'skipOnError' => true, 'targetClass' => StoreRoom::className(), 'targetAttribute' => ['store_room_id' => 'id']], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'part_id' => 'Part ID', 'store_room_id' => 'Store Room ID', 'created_at' => 'Created At', 'updated_at' => 'Updated At', ]; } /** * @return \yii\db\ActiveQuery */ public function getPart() { return $this->hasOne(FixCarPart::className(), ['id' => 'part_id']); } /** * @return \yii\db\ActiveQuery */ public function getStoreRoom() { return $this->hasOne(StoreRoom::className(), ['id' => 'store_room_id']); } }