You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openNG/models/Node.coffee

9 lines
303 B
CoffeeScript

10 years ago
module.exports = (bookshelf) ->
bookshelf.model "Node",
tableName: "nodes"
idAttribute: "id"
relationIdAttribute: "perma_id"
type: -> this.belongsTo "NodeType", "type_id"
tags: -> this.belongsToMany("NodeTag").through "NodeTagAssociation"
attributes: -> this.hasMany "Attribute", "node_id"