package com.example.monitorpatientstatus.controller;

import com.example.monitorpatientstatus.entity.Doctor;
import com.example.monitorpatientstatus.entity.Manager;
import com.example.monitorpatientstatus.service.ManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.example.monitorpatientstatus.entity.Patient;

import java.util.List;

@RequestMapping("/manager")
@RestController
public class ManagerController {
    @Autowired
    private ManagerService managerService;
    @PostMapping("/findall")
    public List<Manager> findAll(){
        return managerService.findAll();
    }
    @PostMapping("/showPatientInfo")
    public String showPatientInfo(Patient patient){return managerService.showPatientInfo(patient);}
    @PostMapping("/modifyPatient")
    public String modifyPatient(Patient patient){return  managerService.modifyPatient(patient);}
    @PostMapping("/modifyDoctor")
    public String modifyDoctor(Doctor doctor){return managerService.modifyDoctor(doctor);}
}
