Created
March 30, 2020 23:56
-
-
Save dalthonmh/5b8d3586974744c4ef6967fd42d534dd to your computer and use it in GitHub Desktop.
Mongo Seeding CLI | examples/import-data-json/models/order.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongoose = require("mongoose"); | |
const Plate = mongoose.model("Plate"); | |
const Schema = mongoose.Schema; | |
const OrderSchema = Schema({ | |
order_detail: [{ type: Schema.Types.ObjectId, ref: Plate }], | |
date: Date, | |
table: Number | |
}); | |
module.exports = mongoose.model("Order", OrderSchema); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment