summaryrefslogtreecommitdiff
path: root/db/schema/knox/approvals.ts
blob: 27332ed68eb11b65d319777463441add1eab557b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { boolean, jsonb, text, timestamp, } from "drizzle-orm/pg-core";
import { knoxSchema } from "./employee";

export const approval = knoxSchema.table("approval", {
  apInfId: text("ap_inf_id").primaryKey(),
  userId: text("user_id").notNull(),
  epId: text("ep_id").notNull(),
  emailAddress: text("email_address").notNull(),
  subject: text("subject").notNull(),
  content: text("content").notNull(),
  status: text("status").notNull(),
  aplns: jsonb("aplns").notNull(),
  isDeleted: boolean("is_deleted").notNull().default(false),
  createdAt: timestamp("created_at").notNull().defaultNow(),
  updatedAt: timestamp("updated_at").notNull().defaultNow(),
});