Skip to content

Instantly share code, notes, and snippets.

@dalthonmh
Created March 30, 2020 23:58
Show Gist options
  • Save dalthonmh/235d4cb77ca0ad42628d9c9271077bfa to your computer and use it in GitHub Desktop.
Save dalthonmh/235d4cb77ca0ad42628d9c9271077bfa to your computer and use it in GitHub Desktop.
Mongo Seeding CLI | examples/import-data-json/models/plate.js
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