tabletop-companion/app/models/game_system.rb

11 lines
297 B
Ruby

# frozen_string_literal: true
class GameSystem < ApplicationRecord
has_many :characters, dependent: :restrict_with_error
has_many :tables, dependent: :restrict_with_error
validates :name, presence: true,
uniqueness: true,
length: { maximum: 100 }
end