UNPKG

@coursebuilder/adapter-drizzle

Version:

Drizzle adapter for Course Builder.

42 lines (40 loc) 1.17 kB
import { __name } from "./chunk-H736K5TN.js"; // src/lib/mysql/schemas/communication/communication-channel.ts import { boolean, index, text, timestamp, varchar } from "drizzle-orm/mysql-core"; function getCommunicationChannelSchema(mysqlTable) { return mysqlTable("CommunicationChannel", { id: varchar("id", { length: 255 }).notNull().primaryKey(), organizationId: varchar("organizationId", { length: 191 }), name: varchar("name", { length: 255 }).notNull(), description: text("description"), active: boolean("active").notNull().default(true), createdAt: timestamp("createdAt", { mode: "date", fsp: 3 }).defaultNow(), updatedAt: timestamp("updatedAt", { mode: "date", fsp: 3 }).defaultNow(), deletedAt: timestamp("deletedAt", { mode: "date", fsp: 3 }) }, (cc) => ({ nameIdx: index("name_idx").on(cc.name), organizationIdIdx: index("organizationId_idx").on(cc.organizationId) })); } __name(getCommunicationChannelSchema, "getCommunicationChannelSchema"); export { getCommunicationChannelSchema }; //# sourceMappingURL=chunk-WJWJ6E5Y.js.map