UNPKG

@lobehub/chat

Version:

Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.

19 lines (15 loc) 561 B
import { timestamp } from 'drizzle-orm/pg-core'; export const timestamptz = (name: string) => timestamp(name, { withTimezone: true }); export const createdAt = () => timestamptz('created_at').notNull().defaultNow(); export const updatedAt = () => timestamptz('updated_at') .notNull() .defaultNow() .$onUpdate(() => new Date()); export const accessedAt = () => timestamptz('accessed_at').notNull().defaultNow(); // columns.helpers.ts export const timestamps = { accessedAt: accessedAt(), createdAt: createdAt(), updatedAt: updatedAt(), };