Thursday, September 19, 2024 11:47:07 PM
> settings

Customize


Authenticate

> server_reward.rb
# frozen_string_literal: true

class ServerReward < ApplicationRecord
  attribute :server_id, :integer
  attribute :reward_id, :string

  # Valid attributes:
  #   class_name <String>
  #   quantity <Integer>
  attribute :reward_items, :json, default: {}

  # Valid attributes:
  #   class_name <String>
  #   spawn_location <String> Valid options: "nearby", "virtual_garage", "player_decides"
  attribute :reward_vehicles, :json, default: []

  attribute :player_poptabs, :integer, limit: 8, default: 0
  attribute :locker_poptabs, :integer, limit: 8, default: 0
  attribute :respect, :integer, limit: 8, default: 0
  attribute :cooldown_quantity, :integer
  attribute :cooldown_type, :string

  belongs_to :server

  scope :default, -> { where(reward_id: nil).first }
end
All opinions represented herein are my own
- © 2024 itsthedevman
- build 3c15a1b