You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: event.rb
    path of file: ./repos/bootcamp/app/models
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class Event < ApplicationRecord
  include WithAvatar
  include Commentable
  include Footprintable
  include Reactionable
  include Watchable
  include Searchable

  validates :title, presence: true
  vali
    
  def update_participations
    first_come_participations.each.with_index(1) do |participation, i|
      if i <= capacity
        participation.update(enable: true)
        send_notification(participation.user) if participation.waited?
      else
        participation.update(enable: false)
      end
    end