summaryrefslogtreecommitdiff
path: root/db/schema/projects.ts
blob: 9e253d778545613b3b5f466630188a9e515a79f7 (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