update schema types: remove ProzessSchritt, add sitzung, update nutzer/sprechstunde
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,38 +1,28 @@
|
||||
import { z } from "zod"
|
||||
|
||||
export const prozessSchrittEnum = z.enum([
|
||||
"neu",
|
||||
"sprechstunde_absolviert",
|
||||
"diagnose_erhalten",
|
||||
"tss_beantragt",
|
||||
"eigensuche",
|
||||
"antrag_gestellt",
|
||||
])
|
||||
export type ProzessSchritt = z.infer<typeof prozessSchrittEnum>
|
||||
import { z } from "zod";
|
||||
|
||||
export const kontaktKanalEnum = z.enum([
|
||||
"telefon",
|
||||
"email",
|
||||
"online_formular",
|
||||
"persoenlich",
|
||||
])
|
||||
export type KontaktKanal = z.infer<typeof kontaktKanalEnum>
|
||||
]);
|
||||
export type KontaktKanal = z.infer<typeof kontaktKanalEnum>;
|
||||
|
||||
export const kontaktErgebnisEnum = z.enum([
|
||||
"keine_antwort",
|
||||
"absage",
|
||||
"warteliste",
|
||||
"zusage",
|
||||
])
|
||||
export type KontaktErgebnis = z.infer<typeof kontaktErgebnisEnum>
|
||||
]);
|
||||
export type KontaktErgebnis = z.infer<typeof kontaktErgebnisEnum>;
|
||||
|
||||
export const therapieformEnum = z.enum([
|
||||
"verhaltenstherapie",
|
||||
"tiefenpsychologisch",
|
||||
"analytisch",
|
||||
"systemisch",
|
||||
])
|
||||
export type Therapieform = z.infer<typeof therapieformEnum>
|
||||
]);
|
||||
export type Therapieform = z.infer<typeof therapieformEnum>;
|
||||
|
||||
export const nutzerSchema = z.object({
|
||||
id: z.number(),
|
||||
@@ -40,12 +30,8 @@ export const nutzerSchema = z.object({
|
||||
plz: z.string().nullable(),
|
||||
ort: z.string().nullable(),
|
||||
krankenkasse: z.string().nullable(),
|
||||
aktueller_schritt: prozessSchrittEnum,
|
||||
dringlichkeitscode: z.boolean(),
|
||||
dringlichkeitscode_datum: z.string().nullable(),
|
||||
tss_beantragt: z.boolean(),
|
||||
tss_beantragt_datum: z.string().nullable(),
|
||||
})
|
||||
tss_kontaktiert_datum: z.string().nullable(),
|
||||
});
|
||||
|
||||
export const therapeutSchema = z.object({
|
||||
id: z.number(),
|
||||
@@ -58,7 +44,7 @@ export const therapeutSchema = z.object({
|
||||
website: z.string().nullable(),
|
||||
therapieform: z.string().nullable(),
|
||||
kassenzulassung: z.string().nullable(),
|
||||
})
|
||||
});
|
||||
|
||||
export const kontaktSchema = z.object({
|
||||
id: z.number(),
|
||||
@@ -68,13 +54,17 @@ export const kontaktSchema = z.object({
|
||||
ergebnis: kontaktErgebnisEnum,
|
||||
notiz: z.string().nullable(),
|
||||
antwort_datum: z.string().nullable(),
|
||||
})
|
||||
});
|
||||
|
||||
export const sprechstundeSchema = z.object({
|
||||
id: z.number(),
|
||||
therapeut_id: z.number(),
|
||||
datum: z.string(),
|
||||
ergebnis: z.string().nullable(),
|
||||
diagnose: z.string().nullable(),
|
||||
dringlichkeitscode: z.boolean(),
|
||||
})
|
||||
});
|
||||
|
||||
export const sitzungSchema = z.object({
|
||||
id: z.number(),
|
||||
sprechstunde_id: z.number(),
|
||||
datum: z.string(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user