masodik_gyak
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user