class Order
  constructor: (@attributes)->
  table_number: -> @attributes.table_number
  id: -> @attributes.id || @attributes._id
  total_amount: -> @attributes.total_amount
  section_title: -> @attributes.section_title
  list_id: -> @attributes.list_id
  state: -> @attributes.state
  display: ->
    order_txts = []
    return '' unless @attributes.products
    for product in @attributes.products
      order_txts.push(product.name + ' (' + product.number + ')')
    order_txts.join(', ')
  can_process: -> @attributes.state == 'placed'

@Order = Order
