{"size": 374, "ext": "js", "max_stars_repo_path": "models/genre.js", "max_stars_repo_name": "karthikknight/eCommerce_bookStore", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "models/genre.js", "max_issues_repo_name": "karthikknight/eCommerce_bookStore", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "models/genre.js", "max_forks_repo_name": "karthikknight/eCommerce_bookStore", "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": 18.7, "max_line_length": 64, "alphanum_fraction": 0.6764705882}
var mongoose= require('mongoose');

//Genre schema
var genreSchema= mongoose.Schema({
	name:{
		type: String,
		required: true
	},
	create_date:{
		type: Date,
		default: Date.now
	}
});

var Genre=module.exports= mongoose.model('Genre', genreSchema);

// Get Genres
module.exports.getGenres=function(callback,limit){
	Genre.find(callback).limit(limit);
}