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: domain.rb
    path of file: ./repos/lobsters/app/models
    
    the code of the file until where you have to start completion: # typed: false

class Domain < ApplicationRecord
  has_many :stories
  belongs_to :banned_by_user,
    class_name: "Use
    
  def ban_by_user_for_reason!(banner, reason)
    self.banned_at = Time.current
    self.banned_by_user_id = banner.id
    self.banned_reason = reason
    save!

    m = Moderation.new
    m.moderator_user_id = banner.id
    m.domain = self
    m.action = "Banned"
    m.reason = reason
    m.save!
  end