import { prismaClient } from '../database/prismaClient.js';
export async function createPlugin(data) {
    console.log(`Creating Plugin with ID: ${data.id}`);
    return prismaClient.plugin.create({
        data,
    });
}
export async function getPlugin(id) {
    console.log(`Getting Plugin with ID: ${id}`);
    return prismaClient.plugin.findUnique({
        where: { id },
    });
}
export async function listPlugins() {
    console.log('Listing all Plugins');
    return prismaClient.plugin.findMany();
}
export async function updatePlugin(id, data) {
    console.log(`Updating Plugin with ID: ${id}`);
    return prismaClient.plugin.update({
        where: { id },
        data,
    });
}
export async function deletePlugin(id) {
    console.log(`Deleting Plugin with ID: ${id}`);
    return prismaClient.plugin.delete({
        where: { id },
    });
}
