Files
puzzle-scoreboard/app/models/offline.rb
sto 35ad7da355
Some checks failed
CI / scan_ruby (push) Successful in 18s
CI / scan_js (push) Successful in 15s
CI / lint (push) Failing after 14s
CI / test (push) Failing after 15m10s
Add offline model and "new" form/controller
2025-10-29 17:20:38 +01:00

28 lines
581 B
Ruby

# == Schema Information
#
# Table name: offlines
#
# id :integer not null, primary key
# end_time :datetime
# start_time :datetime not null
# created_at :datetime not null
# updated_at :datetime not null
# contest_id :integer not null
#
# Indexes
#
# index_offlines_on_contest_id (contest_id)
#
# Foreign Keys
#
# contest_id (contest_id => contests.id)
#
class Offline < ApplicationRecord
belongs_to :contest
has_one_attached :start_image
has_one_attached :end_image
validates :start_time, presence: true
end