sto 67d2ef41b3
All checks were successful
CI / scan_ruby (push) Successful in 17s
CI / scan_js (push) Successful in 12s
CI / lint (push) Successful in 14s
CI / test (push) Successful in 36s
Add indicator for processed messages
2025-06-18 18:42:04 +02:00

29 lines
670 B
Ruby

# == Schema Information
#
# Table name: messages
#
# id :integer not null, primary key
# author :string
# display_time :string
# text :string not null
# time_seconds :integer not null
# created_at :datetime not null
# updated_at :datetime not null
# contest_id :integer not null
#
# Indexes
#
# index_messages_on_contest_id (contest_id)
#
# Foreign Keys
#
# contest_id (contest_id => contests.id)
#
class Message < ApplicationRecord
belongs_to :contest
has_many :completions, dependent: :nullify
validates :author, presence: true
validates :text, presence: true
end