['importer_id', 'margin_id'], 'message' => 'The combination of Importer ID and Margin ID has already been taken.'] ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'importer_id' => 'Поставщик', 'margin_id' => 'Тип цены', 'koef' => 'Коэффициент', ]; } public function getImporters() { return $this->hasOne(Importers::className(), ['id' => 'importer_id']); } public function getMargins() { return $this->hasOne(Margins::className(), ['id' => 'margin_id']); } }