attr = DS.attr
App.ProductCategory = DS.Model.extend
  name: attr('string')
  active_on_sunday: attr('boolean', defaultValue: true)
  active_on_monday: attr('boolean', defaultValue: true)
  active_on_tuesday: attr('boolean', defaultValue: true)
  active_on_wednesday: attr('boolean', defaultValue: true)
  active_on_thursday: attr('boolean', defaultValue: true)
  active_on_friday: attr('boolean', defaultValue: true)
  active_on_saturday: attr('boolean', defaultValue: true)
  full_day: attr 'boolean', defaultValue: true
  start_from: attr('number')
  end_on: attr('number')
  position: attr('number', defaultValue: 0)
  collapsed: attr('boolean', defaultValue: false)

  products: DS.hasMany('product', async: false)
  supplier: DS.belongsTo('supplier', async: false)

  sorted_products: (-> @get('products').sortBy('position') ).property('products.@each.position')
