100], [['dt'], 'string', 'max' => 15], [['user_id', 'art'], 'unique', 'targetAttribute' => ['user_id', 'art'], 'message' => 'The combination of User ID and Art has already been taken.'] ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'user_id' => '№', 'art' => 'Нмер', 'dt' => 'Дата', 'name' => 'Клиент' ]; } // public function getAccounts() // { // return $this->hasOne(Accounts::className(), ['id' => 'user_id']); // } public function getName(){ return $this->user_id.'11111111'; } }