package thyyxxk.webserver.controller.zhuyuanyizheng;

import org.springframework.web.bind.annotation.*;
import thyyxxk.webserver.entity.ResultVo;
import thyyxxk.webserver.entity.zhuyuanyisheng.PatientFamily;
import thyyxxk.webserver.service.zhuyuanyisheng.PatientFamilyServer;

@RestController
@RequestMapping("/patientFamily")
public class PatientFamilyController {
    private final PatientFamilyServer server;

    public PatientFamilyController(PatientFamilyServer server) {
        this.server = server;
    }

    @PostMapping("/insert")
    public ResultVo<Integer> insert(@RequestBody PatientFamily pf) {
        return server.insert(pf);
    }

    @PostMapping("/update")
    public ResultVo<Integer> update(@RequestBody PatientFamily pf) {
        return server.update(pf);
    }

    @GetMapping("/delete")
    public ResultVo<Integer> delete(@RequestParam("id") String id) {
        return server.delete(id);
    }

}
