attr = DS.attr
App.Employee= DS.Model.extend Ember.Validations.Mixin,
  name: attr 'string'
  email: attr 'string'
  manager: attr 'boolean', defaultValue: false
  active: attr 'boolean', defaultValue: true
  color: attr 'string', defaultValue: '#3a87ad'
  employee_shifts: DS.hasMany('employee-shift')

  isManager: -> @get('manager')

  validations:
    name: {presence: true}
    email: {format: /.+@.+\..{2,4}/}
