Created
March 30, 2020 23:58
-
-
Save dalthonmh/235d4cb77ca0ad42628d9c9271077bfa to your computer and use it in GitHub Desktop.
Mongo Seeding CLI | examples/import-data-json/models/plate.js
This file contains hidden or 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 PlateSchema = mongoose.Schema({ | |
name: String, | |
price: Number, | |
category: { | |
type: String, | |
enum: ["fund", "entry"], | |
default: "fund" | |
} | |
}); | |
module.exports = mongoose.model("Plate", PlateSchema); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment