feat: Implement graphical student ID card generation for user profiles.

This commit is contained in:
syntaxbullet
2025-12-08 22:33:01 +01:00
parent 4d553ddc91
commit bcfd254071
9 changed files with 159 additions and 17 deletions

View File

@@ -25,7 +25,12 @@ export const classService = {
};
return tx ? await execute(tx) : await DrizzleClient.transaction(execute);
},
getClassBalance: async (classId: bigint) => {
const cls = await DrizzleClient.query.classes.findFirst({
where: eq(classes.id, classId),
});
return cls?.balance || 0n;
},
modifyClassBalance: async (classId: bigint, amount: bigint, tx?: any) => {
const execute = async (txFn: any) => {
const cls = await txFn.query.classes.findFirst({