import { prismaClient } from '../database/prismaClient.js';
export async function createChat(data) {
    return prismaClient.chat.create({
        data,
    });
}
export async function getChat(id) {
    return prismaClient.chat.findUnique({
        where: { id },
    });
}
export async function listChats() {
    return prismaClient.chat.findMany();
}
export async function updateChat(id, data) {
    return prismaClient.chat.update({
        where: { id },
        data,
    });
}
export async function deleteChat(id) {
    return prismaClient.chat.delete({
        where: { id },
    });
}
