tabletop-companion/app/models/table.rb

13 lines
329 B
Ruby
Raw Normal View History

2024-05-28 11:08:19 +00:00
# frozen_string_literal: true
class Table < ApplicationRecord
belongs_to :owner, class_name: "User"
belongs_to :game_system
validates :name, presence: true,
length: { maximum: 100 }
validates :slug, presence: true,
length: { maximum: 100 },
uniqueness: true
end