feat(patient-connection-page demo added)
This commit is contained in:
@@ -9,4 +9,5 @@ export * from "./user-types";
|
||||
export * from "./databaseBackup-types";
|
||||
export * from "./notifications-types";
|
||||
export * from "./cloudStorage-types";
|
||||
export * from "./payments-reports-types";
|
||||
export * from "./payments-reports-types";
|
||||
export * from "./patientConnection-types";
|
||||
42
packages/db/types/patientConnection-types.ts
Normal file
42
packages/db/types/patientConnection-types.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import { CommunicationUncheckedCreateInputObjectSchema } from "@repo/db/usedSchemas";
|
||||
import { z } from "zod";
|
||||
|
||||
/**
|
||||
* Full Communication type (Prisma unchecked create input)
|
||||
*/
|
||||
export type Communication = z.infer<
|
||||
typeof CommunicationUncheckedCreateInputObjectSchema
|
||||
>;
|
||||
|
||||
/**
|
||||
* Insert Communication
|
||||
* - excludes auto-generated fields
|
||||
*/
|
||||
export const insertCommunicationSchema = (
|
||||
CommunicationUncheckedCreateInputObjectSchema as unknown as z.ZodObject<any>
|
||||
).omit({
|
||||
id: true,
|
||||
createdAt: true,
|
||||
});
|
||||
|
||||
export type InsertCommunication = z.infer<
|
||||
typeof insertCommunicationSchema
|
||||
>;
|
||||
|
||||
/**
|
||||
* Update Communication
|
||||
* - excludes immutable fields
|
||||
* - makes everything optional
|
||||
*/
|
||||
export const updateCommunicationSchema = (
|
||||
CommunicationUncheckedCreateInputObjectSchema as unknown as z.ZodObject<any>
|
||||
)
|
||||
.omit({
|
||||
id: true,
|
||||
createdAt: true,
|
||||
})
|
||||
.partial();
|
||||
|
||||
export type UpdateCommunication = z.infer<
|
||||
typeof updateCommunicationSchema
|
||||
>;
|
||||
Reference in New Issue
Block a user