Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: introduced teamName, eventName, projectName in discovered question #1916

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading