Skip to content

Commit

Permalink
feat: introduced teamName, eventName, projectName in discovered question
Browse files Browse the repository at this point in the history
  • Loading branch information
navneethkrish authored and madan-ideas2it committed Sep 5, 2024
1 parent f99d8a3 commit 59453dd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- AlterTable
ALTER TABLE "DiscoveryQuestion" ADD COLUMN "eventName" TEXT,
ADD COLUMN "projectName" TEXT,
ADD COLUMN "teamName" TEXT;
3 changes: 3 additions & 0 deletions apps/web-api/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -517,10 +517,13 @@ model DiscoveryQuestion {
isActive Boolean @default(true)
teamUid String?
team Team? @relation("TeamRelatedDiscoveryQuestions", fields: [teamUid], references: [uid])
teamName String?
projectUid String?
project Project? @relation("ProjectRelatedDiscoveryQuestions", fields: [projectUid], references: [uid])
projectName String?
eventUid String?
plevent PLEvent? @relation("PLEventRelatedDiscoveryQuestions", fields: [eventUid], references: [uid])
eventName String?
createdBy String
creator Member? @relation("MemberCreatedDiscoveryQuestions", fields: [createdBy], references: [uid])
modifiedBy String
Expand Down
6 changes: 6 additions & 0 deletions libs/contracts/src/schema/discovery-question.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ export const DiscoveryQuestionSchema = z.object({
shareCount: z.number().int(),
isActive: z.boolean().default(true),
teamUid: z.string().nullish(),
teamName: z.string().nullish(),
eventUid: z.string().nullish(),
eventName: z.string().nullish(),
projectUid: z.string().nullish(),
projectName: z.string().nullish(),
answer: z.string().optional(),
answerSources: z.any().optional(),
relatedQuestions: z.any().optional(),
Expand All @@ -31,8 +34,11 @@ export const CreateDiscoveryQuestionSchema = DiscoveryQuestionSchema.pick({
shareCount: true,
isActive: true,
teamUid: true,
teamName: true,
eventUid: true,
eventName: true,
projectUid: true,
projectName: true,
answer: true,
relatedQuestions: true,
answerSources: true,
Expand Down

0 comments on commit 59453dd

Please sign in to comment.