class AdminUser < ApplicationRecord
  devise :database_authenticatable,
         :recoverable, :rememberable, :validatable

  belongs_to :member, optional: true

  default_scope { where(deleted_at: nil) }

  def self.ransackable_attributes(auth_object = nil)
    %w[created_at deleted_at email id member_id updated_at]
  end

  def self.ransackable_associations(auth_object = nil)
    %w[member]
  end
end
