Skip to content

Instantly share code, notes, and snippets.

@dalthonmh
Last active March 30, 2020 23:59
Show Gist options
  • Save dalthonmh/2420dcb343f54a9cf1332d12d73e0dd3 to your computer and use it in GitHub Desktop.
Save dalthonmh/2420dcb343f54a9cf1332d12d73e0dd3 to your computer and use it in GitHub Desktop.
Mongo Seeding CLI | examples/import-data-json/models/user.js
const mongoose = require("mongoose");
const UserShema = mongoose.Schema({
name: String,
lastname: String,
username: {
type: String,
unique: true
},
password: String,
role: {
type: String,
enum: ["mozo", "despachador", "admin"],
default: "mozo"
}
});
module.exports = mongoose.model("User", UserShema);
@dalthonmh
Copy link
Author

dalthonmh commented Mar 30, 2020

Mongo Seeding CLI | models/user.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment