feat(auth): finally better auth working as i wanted it to

This commit is contained in:
2025-09-22 22:40:44 -05:00
parent 4ab43d91b9
commit 8f1375ab7b
50 changed files with 7939 additions and 5909 deletions

View File

@@ -1,8 +1,8 @@
import { pgTable, text, uuid, uniqueIndex } from "drizzle-orm/pg-core";
import { user } from "./auth-schema.js";
export const userRole = pgTable(
"user_role",
export const userRoles = pgTable(
"user_roles",
{
userRoleId: uuid("user_role_id").defaultRandom().primaryKey(),
userId: text("user_id")
@@ -15,3 +15,4 @@ export const userRole = pgTable(
uniqueIndex("unique_user_module").on(table.userId, table.module),
]
);
export type UserRole = typeof userRoles.$inferSelect;