Appointment with Mongo
This commit is contained in:
31
server/src/graphql/models/appointment.js
Normal file
31
server/src/graphql/models/appointment.js
Normal 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)
|
||||
Reference in New Issue
Block a user