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),
}));