Chore(backend): Enable attaching attachments to companies and people (backend) (#1726)

Enable attaching attachments to companies and people (backend)

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
This commit is contained in:
gitstart-twenty
2023-09-26 10:39:13 +01:00
committed by GitHub
parent ba86be2c5b
commit f60c209e39
5 changed files with 91 additions and 11 deletions

View File

@ -270,6 +270,7 @@ model Company {
ActivityTarget ActivityTarget[]
PipelineProgress PipelineProgress[]
Favorite Favorite[]
Attachment Attachment[]
@@map("companies")
}
@ -322,6 +323,7 @@ model Person {
ActivityTarget ActivityTarget[]
PipelineProgress PipelineProgress[]
Favorite Favorite[]
Attachment Attachment[]
@@map("people")
}
@ -580,8 +582,15 @@ model Attachment {
workspaceMemberAuthor WorkspaceMember? @relation(fields: [workspaceMemberAuthorId], references: [id], name: "authoredAttachments", onDelete: Cascade)
workspaceMemberAuthorId String?
activity Activity @relation(fields: [activityId], references: [id], onDelete: Cascade)
activityId String
activity Activity? @relation(fields: [activityId], references: [id], onDelete: Cascade)
activityId String?
/// @TypeGraphQL.omit(input: true, output: false)
person Person? @relation(fields: [personId], references: [id], onDelete: Cascade)
personId String?
/// @TypeGraphQL.omit(input: true, output: false)
company Company? @relation(fields: [companyId], references: [id], onDelete: Cascade)
companyId String?
/// @TypeGraphQL.omit(input: true, output: false)
workspace Workspace @relation(fields: [workspaceId], references: [id])