Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const mongoose = require('mongoose');
- const kittenSchema = new mongoose.Schema({
- name: {
- type: String,
- required: true,
- unique: true
- },
- colour: String,
- birthday: Date
- })
- const Kitten = mongoose.model("Kitten", kittenSchema)
- module.exports = {
- model: Kitten,
- schema: kittenSchema
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement