Opportunity fields (#744)
* Add opportunity probability and point of contact * Have requests sent properly * Add probaility field
This commit is contained in:
@ -0,0 +1,15 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- Made the column `settingsId` on table `users` required. This step will fail if there are existing NULL values in that column.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "pipeline_progresses" ADD COLUMN "pointOfContactId" TEXT,
|
||||
ADD COLUMN "probability" INTEGER;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "users" ALTER COLUMN "settingsId" SET NOT NULL;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "pipeline_progresses" ADD CONSTRAINT "pipeline_progresses_pointOfContactId_fkey" FOREIGN KEY ("pointOfContactId") REFERENCES "people"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
@ -251,8 +251,9 @@ model Person {
|
||||
/// @TypeGraphQL.omit(input: true, output: true)
|
||||
deletedAt DateTime?
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
PipelineProgress PipelineProgress[]
|
||||
|
||||
@@map("people")
|
||||
}
|
||||
@ -436,14 +437,17 @@ enum PipelineProgressableType {
|
||||
model PipelineProgress {
|
||||
/// @Validator.IsString()
|
||||
/// @Validator.IsOptional()
|
||||
id String @id @default(uuid())
|
||||
amount Int?
|
||||
closeDate DateTime?
|
||||
id String @id @default(uuid())
|
||||
amount Int?
|
||||
closeDate DateTime?
|
||||
probability Int?
|
||||
|
||||
pipeline Pipeline @relation(fields: [pipelineId], references: [id])
|
||||
pipelineId String
|
||||
pipelineStage PipelineStage @relation(fields: [pipelineStageId], references: [id])
|
||||
pipelineStageId String
|
||||
pointOfContact Person? @relation(fields: [pointOfContactId], references: [id])
|
||||
pointOfContactId String?
|
||||
progressableType PipelineProgressableType
|
||||
progressableId String
|
||||
/// @TypeGraphQL.omit(input: true, output: true)
|
||||
|
||||
Reference in New Issue
Block a user