import db from "db/connection";
import { getLoots, type lootTriggers } from "db/schema";
import type { inventory } from "items";
import type User from "user";

export async function createGetLootRecord(
	user: User,
	qbucks: number,
	inventory: inventory,
	trigger: lootTriggers,
) {
	await db.insert(getLoots).values({
		user: parseInt(user.id, 10),
		qbucks: qbucks,
		items: inventory,
		trigger,
	});
}
