Events: initial implementation
This commit is contained in:
26
app/models/event.rb
Normal file
26
app/models/event.rb
Normal file
@@ -0,0 +1,26 @@
|
||||
# == 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
|
||||
Reference in New Issue
Block a user