mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-19 12:10:37 +09:00
13 lines
621 B
TypeScript
13 lines
621 B
TypeScript
|
|
import { pgTable, uuid, text, integer, timestamp } from "drizzle-orm/pg-core";
|
||
|
|
|
||
|
|
export const companies = pgTable("companies", {
|
||
|
|
id: uuid("id").primaryKey().defaultRandom(),
|
||
|
|
name: text("name").notNull(),
|
||
|
|
description: text("description"),
|
||
|
|
status: text("status").notNull().default("active"),
|
||
|
|
budgetMonthlyCents: integer("budget_monthly_cents").notNull().default(0),
|
||
|
|
spentMonthlyCents: integer("spent_monthly_cents").notNull().default(0),
|
||
|
|
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
||
|
|
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
||
|
|
});
|