{"size": 406, "ext": "js", "max_stars_repo_path": "schemas/purchase.js", "max_stars_repo_name": "ollebergkvist/api-movies", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "schemas/purchase.js", "max_issues_repo_name": "ollebergkvist/api-movies", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "schemas/purchase.js", "max_forks_repo_name": "ollebergkvist/api-movies", "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": 27.0666666667, "max_line_length": 74, "alphanum_fraction": 0.657635468}
const mongoose = require('mongoose');
const schema = mongoose.Schema;

const purchaseSchema = new schema(
	{
		movieID: { type: String, required: true },
		customerID: { type: String, required: true },
		amount: { type: Number, required: true },
		cost: { type: Number, required: true },
	},
	{ timestamps: true }
);

module.exports = mongoose.model('Purchase', purchaseSchema, 'purchases');
