class PaymentRepository {
  constructor(prisma) { this.prisma = prisma; }
  findByUserId(userId) { return this.prisma.payment.findMany({ where: { userId }, orderBy: { createdAt: 'desc' } }); }
  create(data) { return this.prisma.payment.create({ data }); }
  update(id, data) { return this.prisma.payment.update({ where: { id }, data }); }
}

export default PaymentRepository;
