Skip to content

Commit

Permalink
updated task schema model
Browse files Browse the repository at this point in the history
  • Loading branch information
jeessh committed Dec 4, 2024
1 parent 81486db commit 16e8272
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions backend/graphql/types/taskType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const taskType = gql`
id: Int!
type: TaskType!
title: String!
description: String!
description: String
creditValue: Int!
tasksAssigned: [TaskAssignedDTO!]
endDate: DateTime
Expand All @@ -48,7 +48,7 @@ const taskType = gql`
input InputTaskDTO {
type: TaskType!
title: String!
description: String!
description: String
creditValue: Int!
endDate: DateTime
recurrenceFrequency: Recurrence_Frequency!
Expand Down
2 changes: 1 addition & 1 deletion backend/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion backend/services/implementations/taskService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
4 changes: 2 additions & 2 deletions backend/services/interfaces/taskService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface TaskDTO {
id: number;
type: TaskType;
title: string;
description: string;
description?: string;
creditValue: number;
// location: TaskLocationDTO;
endDate: Date | null;
Expand All @@ -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;
Expand Down

0 comments on commit 16e8272

Please sign in to comment.