@startuml Manage Dentist (POST)

header Dentist Booking Sequence Diagram
footer Page %page% of %lastpage%
title "Manage Dentist (POST)"

participant "Client" as client
participant "<<javaScript>>\n:server" as server
participant "<<router>>\n:dentists" as routerDentists
participant "<<controllers>>\n:dentists" as controllersDentists
participant "<<model>>\n:Dentist" as modelDentist
database "<<MongoDB>>\n:dentists" as DentistsDatabase

client->server ++:req.post('/dentists')
server->routerDentists ++:app.use('/dentists',dentists)
routerDentists -> controllersDentists ++:createDentist()
controllersDentists->modelDentist ++:create(req.body)
modelDentist ->DentistsDatabase ++: DentistSchema
DentistsDatabase --> modelDentist --: dentist
controllersDentists <-- modelDentist --:dentist
controllersDentists->client --:response

@enduml
