moved schema to a single file

This commit is contained in:
2024-12-16 17:54:50 -05:00
parent 96fc6a1b16
commit 0bf9011cc6
28 changed files with 3059 additions and 184 deletions

View File

@@ -0,0 +1,13 @@
import { relations } from "drizzle-orm/relations";
import { user, authenticator } from "./schema";
export const authenticatorRelations = relations(authenticator, ({one}) => ({
user: one(user, {
fields: [authenticator.userId],
references: [user.id]
}),
}));
export const userRelations = relations(user, ({many}) => ({
authenticators: many(authenticator),
}));