tyt-api/src/modules/department.ts
2026-01-19 02:10:46 +08:00

12 lines
491 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { uuid, varchar, timestamp, boolean } from "drizzle-orm/pg-core";
export const Department = {
id: uuid().primaryKey().defaultRandom(), // 主键UUID
name: varchar().notNull(), // 科室名称
hospital: uuid().notNull(), // 所属医院
description: varchar(), // 科室描述
isActive: boolean().notNull().default(true), // 是否启用
createdAt: timestamp().notNull().defaultNow(), // 创建时间
updatedAt: timestamp().notNull().defaultNow(), // 更新时间
};