import type { PaymentInfoPayload } from "../data/entities";
import type { PaymentInfoRepository } from "../data/repository";

export class PaymentInfoUseCases {
	repo: PaymentInfoRepository;

	constructor(repo: PaymentInfoRepository) {
		this.repo = repo;
	}

	async createPaymentInfo(payload: PaymentInfoPayload) {
		return this.repo.createPaymentInfo(payload);
	}

	async getPaymentInfo(id: number) {
		return this.repo.getPaymentInfo(id);
	}

	async updatePaymentInfoOrderId(id: number, orderId: number) {
		return this.repo.updatePaymentInfoOrderId(id, orderId);
	}

	async deletePaymentInfo(id: number) {
		return this.repo.deletePaymentInfo(id);
	}
}
