20], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'role_id' => '角色id', 'user_id' => '用户id', 'app_id' => '类型', ]; } /** * @return \yii\db\ActiveQuery */ public function getRole() { return $this->hasOne(AuthRole::class, ['id' => 'role_id']) ->andFilterWhere(['merchant_id' => Yii::$app->services->merchant->getId()]); } }