import { prisma } from '~/server/utils/prisma' export default defineEventHandler(async (event) => { const body = await readBody(event) const student = await prisma.student.create({ data: { className: body.className, name: body.name, gender: body.gender, birthday: body.birthday || null, address: body.address || null, fatherName: body.fatherName || null, fatherPhone: body.fatherPhone || null, motherName: body.motherName || null, motherPhone: body.motherPhone || null } }) return student })