{"size": 540, "ext": "js", "max_stars_repo_path": "src/main/webapp/static/js/modules/libro/models/LibroModel.js", "max_stars_repo_name": "NotasAnte/Biblioteca", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/main/webapp/static/js/modules/libro/models/LibroModel.js", "max_issues_repo_name": "NotasAnte/Biblioteca", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/main/webapp/static/js/modules/libro/models/LibroModel.js", "max_forks_repo_name": "NotasAnte/Biblioteca", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.7692307692, "max_line_length": 40, "alphanum_fraction": 0.5981481481}
"use strict";

var LibroModel = Backbone.Model.extend({
	//define el id de backbone
	idAttribute 	: 'isbn',
	//atributos por defecto
	defaults		: {
		'isbn'		: null,
		'titulo'	: 'titulo defecto',
		'autor'		: null,
		'precio'	: null,
		'img'		: null,
		'editorial'	: null,
	},
	//sobrescribe fucnion backbone
	validate 		: function(attrs, options){
		if (_.isEmpty(attrs.isbn) 
				|| _.isEmpty(attrs.titulo) 
				|| _.isEmpty(attrs.autor) 
				|| _.isEmpty(attrs.precio)) {
	    	return true;
	    }else{
	    	return false;
	    }
	}
});