utilizing user role repository

This commit is contained in:
rafiarrafif
2025-05-07 21:54:25 +07:00
parent 836c7f7415
commit fb1654e048
3 changed files with 49 additions and 37 deletions

View File

@ -0,0 +1,15 @@
import { Prisma } from "@prisma/client";
import { userRoleModel } from "./userRole.model";
export const createUserRoleRepo = async (
data: Prisma.UserRoleUncheckedCreateInput
) => {
try {
const newUserRole = await userRoleModel.create({
data,
});
return newUserRole;
} catch (error) {
throw error;
}
};