diff --git a/backend/graphql/types/taskType.ts b/backend/graphql/types/taskType.ts index fd69905..4a84242 100644 --- a/backend/graphql/types/taskType.ts +++ b/backend/graphql/types/taskType.ts @@ -36,7 +36,7 @@ const taskType = gql` id: Int! type: TaskType! title: String! - description: String! + description: String creditValue: Int! tasksAssigned: [TaskAssignedDTO!] endDate: DateTime @@ -48,7 +48,7 @@ const taskType = gql` input InputTaskDTO { type: TaskType! title: String! - description: String! + description: String creditValue: Int! endDate: DateTime recurrenceFrequency: Recurrence_Frequency! diff --git a/backend/prisma/schema.prisma b/backend/prisma/schema.prisma index a6dc26a..9416b07 100644 --- a/backend/prisma/schema.prisma +++ b/backend/prisma/schema.prisma @@ -84,7 +84,7 @@ model Task { id Int @id @default(autoincrement()) type TaskType title String - description String + description String? creditValue Float @map("credit_value") // location TaskLocation @relation(fields: [locationId], references: [id], onDelete: Cascade, onUpdate: Cascade) // locationId Int @map("location_id") diff --git a/backend/services/implementations/taskService.ts b/backend/services/implementations/taskService.ts index ef79bc9..ef876b4 100644 --- a/backend/services/implementations/taskService.ts +++ b/backend/services/implementations/taskService.ts @@ -127,7 +127,7 @@ class TaskService implements ITaskService { data: { title: task.title, type: task.type, - description: task.description, + description: task.description ?? "", creditValue: task.creditValue, // location: { // connect: { id: task.locationId }, diff --git a/backend/services/interfaces/taskService.ts b/backend/services/interfaces/taskService.ts index ef385ce..8c6f8e3 100644 --- a/backend/services/interfaces/taskService.ts +++ b/backend/services/interfaces/taskService.ts @@ -9,7 +9,7 @@ export interface TaskDTO { id: number; type: TaskType; title: string; - description: string; + description?: string; creditValue: number; // location: TaskLocationDTO; endDate: Date | null; @@ -27,7 +27,7 @@ export interface TaskDTO { export interface InputTaskDTO { type: TaskType; title: string; - description: string; + description?: string; creditValue: number; // locationId: number; endDate: Date | null;