Pull Request branch dev-clone to main #1
21
apps/backend/src/drizzle/schema/questions.ts
Normal file
21
apps/backend/src/drizzle/schema/questions.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { createId } from "@paralleldrive/cuid2";
|
||||
import {
|
||||
boolean,
|
||||
pgTable,
|
||||
text,
|
||||
timestamp,
|
||||
varchar,
|
||||
} from "drizzle-orm/pg-core";
|
||||
import { subAspects } from "./subAspects"
|
||||
|
||||
export const questions = pgTable("questions", {
|
||||
id: varchar("id", { length: 50 })
|
||||
.primaryKey()
|
||||
.$defaultFn(() => createId()),
|
||||
question: text("question"),
|
||||
needFile: boolean("needFile").default(false),
|
||||
createdAt: timestamp("createdAt", { mode: "date" }).defaultNow(),
|
||||
updatedAt: timestamp("updatedAt", { mode: "date" }).defaultNow(),
|
||||
deletedAt: timestamp("deletedAt", { mode: "date" }),
|
||||
subAspectId: varchar("subAspectId").references(() => subAspects.id),
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user