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: moderation_report.rb
    path of file: ./repos/danbooru/app/models
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class ModerationReport < ApplicationRecord
  MODEL_TYPES 
    
  def create_modaction
    return unless saved_change_to_status? && status != :pending

    if handled?
      ModAction.log("handled modreport ##{id}", :moderation_report_handled, subject: self, user: updater)
    elsif rejected?
      ModAction.log("rejected modreport ##{id}", :moderation_report_rejected, subject: self, user: updater)
    end