// Generated by CoffeeScript 1.9.0
var User, cozydb;

cozydb = require('cozydb');

module.exports = User = cozydb.getModel('User', {
  email: String,
  public_name: String,
  timezone: {
    type: String,
    "default": "Europe/Paris"
  },
  password: String,
  owner: {
    type: Boolean,
    "default": false
  },
  activated: {
    type: Boolean,
    "default": false
  }
});

User.all = function(callback) {
  return User.request("all", callback);
};

User.first = function(callback) {
  return User.all(function(err, users) {
    return callback(err, users != null ? users[0] : void 0);
  });
};

User.destroyAll = function(callback) {
  return User.requestDestroy("all", callback);
};
