masodik_gyak

This commit is contained in:
magdo
2026-02-18 21:02:39 +01:00
parent af57733506
commit 77f7eb2664
22 changed files with 905 additions and 0 deletions
@@ -0,0 +1,5 @@
const { PrismaClient } = require('@prisma/client');
const prisma = new PrismaClient();
module.exports = prisma;
@@ -0,0 +1,38 @@
const prisma = require('../database/prisma');
const IUserRepository = require('../../domain/interfaces/IUserRepository');
// UserRepository implementálja az IUserRepository interfészt
class UserRepository extends IUserRepository {
async create(userData) {
// TODO: Implementáld a user létrehozást Prisma-val
// Példa: return await prisma.user.create({ data: userData });
throw new Error('Not implemented');
}
async findById(id) {
// TODO: Implementáld a user keresést ID alapján
throw new Error('Not implemented');
}
async findByEmail(email) {
// TODO: Implementáld a user keresést email alapján
throw new Error('Not implemented');
}
async findAll() {
// TODO: Implementáld az összes user lekérését
throw new Error('Not implemented');
}
async update(id, userData) {
// TODO: Implementáld a user frissítést
throw new Error('Not implemented');
}
async delete(id) {
// TODO: Implementáld a user törlést
throw new Error('Not implemented');
}
}
module.exports = UserRepository;