class UserListSerializer < Qwaiter::Serializer
  # user ids for facebook pictures
  embed :ids, include: true
  attributes :state, :needs_help, :needs_payment, :user_requests_closing,
    :is_paid, :price, :table_id, :table_number, :section_id, :user_ids,
    :cached_supplier_name, :closed_at, :supplier_id, :extended_version

  #def has_active_orders
    #object.has_active_orders?
  #end
  def cached_supplier_name
    object.supplier.name
  end

  def extended_version
    false
  end
  # has_many :users, serializer: UserUserSerializer
  # has_many :orders
  # has_one :supplier, serializer: UserSupplierSerializer
end
