19 lines
307 B
JavaScript
19 lines
307 B
JavaScript
|
const Backbone = require('backbone');
|
||
|
|
||
|
const model = Backbone.Model.extend({
|
||
|
idAttribute: 'id',
|
||
|
|
||
|
defaults: function () {
|
||
|
return {
|
||
|
name: ''
|
||
|
};
|
||
|
}
|
||
|
});
|
||
|
|
||
|
module.exports = {
|
||
|
Model: model,
|
||
|
Collection: Backbone.Collection.extend({
|
||
|
model: model
|
||
|
})
|
||
|
};
|