{"size": 370, "ext": "js", "max_stars_repo_path": "models/Helpers/OrderItem.js", "max_stars_repo_name": "MichaelLykkeStrand/SARestaurantAPI", "max_stars_repo_stars_event_min_datetime": "2022-02-01T13:41:59.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-09T04:46:46.000Z", "max_issues_repo_path": "models/Helpers/OrderItem.js", "max_issues_repo_name": "MichaelLykkeStrand/SARestaurantAPI", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "models/Helpers/OrderItem.js", "max_forks_repo_name": "MichaelLykkeStrand/SARestaurantAPI", "max_forks_repo_forks_event_min_datetime": "2022-02-06T03:11:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-02-06T03:11:07.000Z"}
{"max_stars_count": 4, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 28.4615384615, "max_line_length": 60, "alphanum_fraction": 0.7}
/**
 * @description Defines a helper order item schema
 */
import mongoose from 'mongoose';
const {Schema} = mongoose;

const OrderItemSchema = new Schema({
    itemRef: {ref: 'MenuItem', type: Schema.Types.ObjectId},
    itemCost: {default: 0, required: true, type: Number},
    itemName: {required: true, trim: true, type: String},
});

export default OrderItemSchema;