class GraphicsElement < ApplicationRecord
  belongs_to :video

  validates :graphic_type, presence: true
  validates :text, presence: true
  validates :time_elapsed, presence: true

  def appears_at
    Timecode.from_seconds(time_elapsed.to_f).to_s
  end
end
