feat: auth foundation, similar tools, costs, redundancy, anonymous voting

This commit is contained in:
root
2026-07-29 21:59:29 +02:00
parent 8b3b7c9955
commit 59badeaa48
22 changed files with 793 additions and 15 deletions
+15
View File
@@ -0,0 +1,15 @@
import { pgTable, text, serial, integer, numeric, timestamp } from "drizzle-orm/pg-core";
import { toolsTable } from "./tools";
import { usersTable } from "./users";
export const toolCostsTable = pgTable("tool_costs", {
id: serial("id").primaryKey(),
toolId: integer("tool_id").notNull().references(() => toolsTable.id, { onDelete: "cascade" }),
licenseType: text("license_type", { enum: ["free", "subscription", "one_time", "usage_based"] }).notNull().default("free"),
cost: numeric("cost", { precision: 10, scale: 2 }),
currency: text("currency").default("EUR"),
renewalDate: timestamp("renewal_date", { withTimezone: true }),
notes: text("notes"),
createdBy: integer("created_by").references(() => usersTable.id),
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
});