import prisma from "@/lib/prisma"; export type ContactRecord = { id: string; firstName: string; lastName: string; companyName: string; address: string; email: string; phone: string; industry: string; notes?: string; subscribe: boolean; createdAt: Date; }; export async function saveContact({ firstName, lastName, companyName, address, email, phone, industry, notes, subscribe, }: Omit): Promise { const { id, createdAt } = await prisma.contact.create({ data: { firstName, lastName, companyName, address, email, phone, industry, notes, subscribe, }, }); return { id, firstName, lastName, companyName, address, email, phone, industry, notes, subscribe, createdAt, }; }