added scaffolding for autumn checkout

This commit is contained in:
John Yeo
2026-01-29 13:48:42 +00:00
parent a0746ad728
commit 2cc9cf71be
39 changed files with 995 additions and 249 deletions

View File

@@ -0,0 +1,15 @@
import { relations } from "drizzle-orm";
import { customers } from "../cusModels/cusTable.js";
import { organizations } from "../orgModels/orgTable.js";
import { checkouts } from "./checkoutTable.js";
export const checkoutsRelations = relations(checkouts, ({ one }) => ({
org: one(organizations, {
fields: [checkouts.org_id],
references: [organizations.id],
}),
customer: one(customers, {
fields: [checkouts.internal_customer_id],
references: [customers.internal_id],
}),
}));