feat: auth foundation, similar tools, costs, redundancy, anonymous voting
This commit is contained in:
@@ -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(),
|
||||
});
|
||||
Reference in New Issue
Block a user