attr = DS.attr
App.Supplier= DS.Model.extend
  name: attr('string')
  extended_version: attr('boolean')
  open: attr('boolean')
  orders_in_process_count: attr('number')
  orders_placed_count: attr('number')

  orders: DS.hasMany('order')
  product_categories: DS.hasMany('product_category', async: true)
  lists: DS.hasMany('list', async: true)

  is_extended_version: ->
    @get('extended_version')

  can_take_orders: (->
    return false unless @get('open')
    true
  ).property('open')
