Files
puzzle-scoreboard/app/models/event.rb
sto 35b304d913
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
Events: initial implementation
2026-07-26 14:01:29 +02:00

27 lines
605 B
Ruby

# == Schema Information
#
# Table name: events
#
# id :integer not null, primary key
# lang :string default("en")
# name :string
# shared_scoreboard :boolean
# created_at :datetime not null
# updated_at :datetime not null
# user_id :integer not null
#
# Indexes
#
# index_events_on_user_id (user_id)
#
# Foreign Keys
#
# user_id (user_id => users.id)
#
class Event < ApplicationRecord
belongs_to :user
has_many :contests, dependent: :destroy
validates :name, presence: true
end