class WikiRevisionLine < ApplicationRecord
  belongs_to :wiki_revision
  belongs_to :wiki_line

  validates :position, presence: true,
                       numericality: { only_integer: true, greater_than_or_equal_to: 0 }
  validates :position, uniqueness: { scope: :wiki_revision_id }
end
