refactor: better shortcut hook

This commit is contained in:
Max Koon
2025-12-05 17:05:23 -05:00
parent 2df7f2d924
commit 76f2a43bd0
21 changed files with 481 additions and 143 deletions

View File

@@ -6,6 +6,7 @@ import {
timestamp,
pgEnum,
uniqueIndex,
numeric,
} from "drizzle-orm/pg-core";
export const users = pgTable(
@@ -65,3 +66,25 @@ export const plaidAccessTokens = pgTable("plaidAccessToken", {
token: text("token").notNull(),
createdAt: timestamp("created_at").notNull().defaultNow(),
});
export const budget = pgTable("budget", {
id: text("id").primaryKey(),
orgId: text("org_id").notNull(),
label: text("label").notNull(),
createdBy: text("created_by").notNull(),
createdAt: timestamp("created_at").notNull().defaultNow(),
updatedAt: timestamp("updated_at").notNull().defaultNow(),
});
export const category = pgTable("category", {
id: text("id").primaryKey(),
budgetId: text("budget_id").notNull(),
amount: decimal("amount").notNull(),
every: text("every", { enum: ["year", "month", "week"] }).notNull(),
order: numeric("order").notNull(),
label: text("label").notNull(),
color: text("color").notNull(),
createdBy: text("created_by").notNull(),
createdAt: timestamp("created_at").notNull().defaultNow(),
updatedAt: timestamp("updated_at").notNull().defaultNow(),
});