['project_id', 'level'], 'message' => 'The combination of Project ID and Level has already been taken.'], [['project_id'], 'exist', 'skipOnError' => true, 'targetClass' => FixCarProject::className(), 'targetAttribute' => ['project_id' => 'id']], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'project_id' => 'Project ID', 'price' => 'Price', 'level' => 'Level', 'type' => 'Type', ]; } /** * @return \yii\db\ActiveQuery */ public function getProject() { return $this->hasOne(FixCarProject::className(), ['id' => 'project_id']); } }