class SetupState < ApplicationRecord
  def self.installed?
    first&.installed? || false
  end

  def self.mark_installed!
    record = first_or_initialize
    record.installed = true
    record.installed_at ||= Time.current
    record.save!
  end

  def self.reset!
    delete_all
  end
end
