UNPKG

grunt-doctrine

Version:

Grunt plugin to convert doctrine xml annotations into backbone models and collections. Useful in conjunction with doctrine apigility. Includes option to scaffold an entire BBB application

44 lines (28 loc) 843 B
define(function(require, exports, module) { "use strict"; var logger = require('lib/console'); var app = require('app'); //var BaseModel = require('doctrine/model/TaxBase'); var Backbone = require("backbone"); //var Model = BaseModel.extend({ var Model = Backbone.Model.extend({ //idAttribute: 'taxId', url: function() { if (this.isNew()) { return app.api + 'tax'; } return app.api + 'tax/' + this.getId(); }, initialize: function() { }, getId: function() { return this.get(this.idAttribute); }, getLabel: function() { return this.get(this.idAttribute); }, validate: function(attrs, options) { } }); module.exports = Model; });