class Api::V1::TradesmenSerializer < ActiveModel::Serializer

  attributes :id, :email, :full_name, :ftc_id, :photo_url, :can_view, :type, :resource_id


  def can_view
    Company.current and Company.current.vendor?
  end

  def type
    'tradesmen'
  end

  def photo_url
    object.picture_url
  end

  def resource_id
    "t-#{object.id}"
  end

end
