You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
368 B
JavaScript

const mongoose = require('mongoose');
const ListSchema = new mongoose.Schema({
title: {
type: String,
required: true,
minLength: 1,
trim: true
},
// With Auth
_userId: {
type: mongoose.Types.ObjectId,
required: true
}
});
const List = mongoose.model('List', ListSchema);
module.exports = { List };