# id integer
# opened_at timestamp
# closed_at timestamp
class Ticket < ActiveRecord::Base
  def self.with_calendar_duration
    select("tickets.*, (closed_at - opened_at) as duration")
  end
end