diff --git a/backend/typescript/services/interfaces/serviceRequest.ts b/backend/typescript/services/interfaces/serviceRequest.ts index f2ce44c..1ac832b 100644 --- a/backend/typescript/services/interfaces/serviceRequest.ts +++ b/backend/typescript/services/interfaces/serviceRequest.ts @@ -1,4 +1,4 @@ -import { CreateServiceRequestDTO, ServiceRequestDTO } from "../../types"; +import { Prisma } from "@prisma/client"; interface IServiceRequest { // get method here @@ -10,7 +10,9 @@ interface IServiceRequest { * @returns a ServiceRequestDTO with the created serviceRequest's information * @throws Error if serviceRequest creation fails */ - postServiceRequest(serviceRequest: CreateServiceRequestDTO): Promise; + postServiceRequest( + serviceRequest: Prisma.serviceRequestCreateInput, + ): Promise; /** * Delete a serviceRequest by id diff --git a/backend/typescript/types.ts b/backend/typescript/types.ts index 6728cf1..320b30b 100644 --- a/backend/typescript/types.ts +++ b/backend/typescript/types.ts @@ -34,21 +34,4 @@ export type NodemailerConfig = { }; }; -export type SignUpMethod = "PASSWORD" | "GOOGLE"; - -export type ServiceRequestDTO = { - id: string; - requestName: string; - requesterId: string; - location: string; - shiftTime?: Date; - description?: string; - meal?: string; - cookingMethod: string; - frequency: string; - requestType: ServiceRequestType; -}; - -export type CreateServiceRequestDTO = Omit; - -export type ServiceRequestType = "SITE" | "KITCHEN"; \ No newline at end of file +export type SignUpMethod = "PASSWORD" | "GOOGLE"; \ No newline at end of file