import { prisma as db } from "@repo/db/client";

export const procedureTimeslotStorage = {
  async getProcedureTimeslot(userId: number) {
    return db.procedureTimeslot.findUnique({ where: { userId } });
  },

  async upsertProcedureTimeslot(userId: number, data: object) {
    return db.procedureTimeslot.upsert({
      where: { userId },
      update: { data },
      create: { userId, data },
    });
  },
};
