summaryrefslogtreecommitdiff
path: root/db/schema/projects.ts
blob: 9220b24951efa2f549c4c29e50c8f4a5c381a241 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { pgTable, varchar, text, timestamp, serial } from "drizzle-orm/pg-core"

export const projects = pgTable("projects", {
  id: serial("id").primaryKey(),
  code: varchar("code", { length: 50 }).notNull(),
  name: text("name").notNull(),
  type: varchar("type", { length: 20 }).default("ship").notNull(),

  createdAt: timestamp("created_at").defaultNow().notNull(),
  updatedAt: timestamp("updated_at").defaultNow().notNull(),
})

export type Project = typeof projects.$inferSelect