mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 20:03:12 +03:00
ba810fb0bb
Function wrapper and use strict pragma removed from all node files
27 lines
494 B
JavaScript
27 lines
494 B
JavaScript
var User = require('./user').User,
|
|
Permission = require('./permission').Permission,
|
|
GhostBookshelf = require('./base'),
|
|
Role,
|
|
Roles;
|
|
|
|
Role = GhostBookshelf.Model.extend({
|
|
tableName: 'roles',
|
|
|
|
users: function () {
|
|
return this.belongsToMany(User);
|
|
},
|
|
|
|
permissions: function () {
|
|
return this.belongsToMany(Permission);
|
|
}
|
|
});
|
|
|
|
Roles = GhostBookshelf.Collection.extend({
|
|
model: Role
|
|
});
|
|
|
|
module.exports = {
|
|
Role: Role,
|
|
Roles: Roles
|
|
};
|