adejs/controllers/auth/models.js

15 lines
635 B
JavaScript

const model = require('model');
var user = new model.BaseModel("authUser");
user.addField(new model.SerialField("id"));
user.addField(new model.TextField("username", {unique: true, notNull: true}));
user.addField(new model.TextField("email", {unique: true, notNull: true}));
user.addField(new model.BoolField("active", {notNull: true, default: false}));
user.addField(new model.TextField("activationKey"));
user.addField(new model.PasswordField("password", {notNull: true}));
user.addField(new model.SmallIntegerField("resources"));
user.addField(new model.SmallIntegerField("projectId"));
module.exports = model.createClass(user);