true, 'targetClass' => FixCarPrice::className(), 'targetAttribute' => ['car_price_id' => 'id']], [['project_id'], 'exist', 'skipOnError' => true, 'targetClass' => FixCarProject::className(), 'targetAttribute' => ['project_id' => 'id']], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'price' => 'Price', 'project_id' => 'Project ID', 'car_price_id' => 'Car Price ID', 'created_at' => 'Created At', 'updated_at' => 'Updated At', ]; } /** * @return \yii\db\ActiveQuery */ public function getCarPrice() { return $this->hasOne(FixCarPrice::className(), ['id' => 'car_price_id']); } /** * @return \yii\db\ActiveQuery */ public function getProject() { return $this->hasOne(FixCarProject::className(), ['id' => 'project_id']); } }