hasOne(CmsRoles::class, ['id' => 'role_id']); } public function getRight() { return $this->hasOne(CmsRights::class, ['id' => 'right_id']); } }