コンテンツにスキップ

Appoint

診察の予約を表すモデル。データベースの appoint テーブルに対応します。

定義: src/lib/models/appoint.ts

フィールド

フィールド 説明
appointId number 予約 ID
appointTimeId number どの予約枠か(AppointTime
patientName string 予約者の氏名
patientId number 患者 ID(未登録の患者では 0Patient
memo string 予約に関するメモ(初期値は空文字)

型定義

import { z } from "zod";

export const appointSchema = z.object({
  appointId: z.number(),
  appointTimeId: z.number(),
  patientName: z.string(),
  patientId: z.number(),
  memo: z.string().optional().default("")
});

export type Appoint = z.infer<typeof appointSchema>;