255], [['status_id'], 'exist', 'skipOnError' => true, 'targetClass' => Status::className(), 'targetAttribute' => ['status_id' => 'id']], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'name' => 'Название', 'description' => 'Описание', 'status_id' => 'Статус', 'created_at' => 'Created At', 'updated_at' => 'Updated At', ]; } /** * @return \yii\db\ActiveQuery */ public function getStatus() { return $this->hasOne(Status::className(), ['id' => 'status_id']); } /** * @return \yii\db\ActiveQuery */ public function getFieldsValues() { return $this->hasMany(FieldsValue::className(), ['company_id' => 'id']); } }