You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
991 B
45 lines
991 B
/**
|
|
* Created by rain on 2015/11/11.
|
|
*/
|
|
module.exports = function (dc) {
|
|
dc.models.Role = dc.orm.define('role', {
|
|
name: {
|
|
type: dc.ORM.STRING,
|
|
field: 'name'
|
|
},
|
|
desc: {
|
|
type: dc.ORM.STRING,
|
|
field: 'desc'
|
|
}
|
|
});
|
|
dc.models.User = dc.orm.define('user', {
|
|
username: {
|
|
type: dc.ORM.STRING,
|
|
field: 'username'
|
|
},
|
|
password: {
|
|
type: dc.ORM.STRING,
|
|
field: 'password'
|
|
},
|
|
phone: {
|
|
type: dc.ORM.STRING,
|
|
field: 'phone'
|
|
},
|
|
email: {
|
|
type: dc.ORM.STRING,
|
|
field: 'email'
|
|
},
|
|
apikey: {
|
|
type: dc.ORM.STRING,
|
|
field: 'apikey'
|
|
},
|
|
enable: {
|
|
type: dc.ORM.BOOLEAN,
|
|
field: 'enable'
|
|
},
|
|
creator: {
|
|
type: dc.ORM.INTEGER,
|
|
field: 'creator'
|
|
}
|
|
});
|
|
};
|