Appointment with Mongo

This commit is contained in:
Riccardo
2021-01-02 18:37:03 +01:00
parent 30407cac0a
commit c752e3ec80
12 changed files with 330 additions and 112 deletions

View File

@@ -0,0 +1,31 @@
const mongoose = require("mongoose")
const Schema = mongoose.Schema
const appointmentSchema = new Schema(
{
title: {
type: String,
required: true,
},
description: {
type: String,
required: true,
},
timeStart: {
type: Date,
required: true,
},
timeEnd: {
type: Date,
required: true,
},
},
{ timestamps: true }
)
module.exports = mongoose.model("Appointment", appointmentSchema)