diff options
| author | joonhoekim <26rote@gmail.com> | 2025-03-25 15:55:45 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-03-25 15:55:45 +0900 |
| commit | 1a2241c40e10193c5ff7008a7b7b36cc1d855d96 (patch) | |
| tree | 8a5587f10ca55b162d7e3254cb088b323a34c41b /db/schema/projects.ts | |
initial commit
Diffstat (limited to 'db/schema/projects.ts')
| -rw-r--r-- | db/schema/projects.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/db/schema/projects.ts b/db/schema/projects.ts new file mode 100644 index 00000000..9e253d77 --- /dev/null +++ b/db/schema/projects.ts @@ -0,0 +1,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
\ No newline at end of file |
