Files
puzzle-scoreboard/spec/factories/contests.rb
sto 2c87a5b63c
All checks were successful
CI / scan_ruby (push) Successful in 19s
CI / scan_js (push) Successful in 13s
CI / lint (push) Successful in 14s
CI / test (push) Successful in 38s
Add url helpers & specs for offline participation forms
#5
2025-12-10 15:12:19 +01:00

44 lines
1.1 KiB
Ruby

# == Schema Information
#
# Table name: contests
#
# id :integer not null, primary key
# allow_registration :boolean default(FALSE)
# code :string
# duration :string
# duration_seconds :integer
# lang :string default("en")
# name :string
# offline_form :boolean default(FALSE)
# pause_time :datetime
# public :boolean default(FALSE)
# ranking_mode :string
# show_stopwatch :boolean
# slug :string
# start_time :datetime
# team :boolean default(FALSE)
# created_at :datetime not null
# updated_at :datetime not null
# user_id :integer not null
#
# Indexes
#
# index_contests_on_slug (slug) UNIQUE
# index_contests_on_user_id (user_id)
#
# Foreign Keys
#
# user_id (user_id => users.id)
#
FactoryBot.define do
factory :contest do
name { Faker::Company.unique.name }
duration { "2:00" }
ranking_mode { "actual" }
end
trait :offline do
offline_form { true }
end
end