[questions][chore] updating naming scheme

pull/323/head
hpkoh 3 years ago
parent 3c2f23f89b
commit 7d7c7f4550

@ -193,10 +193,10 @@ model QuestionsQuestion {
updatedAt DateTime @updatedAt
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
questionEncounters QuestionsQuestionEncounter[]
questionVotes QuestionsQuestionVote[]
questionComments QuestionsQuestionComment[]
questionsAnswers QuestionsAnswer[]
encounters QuestionsQuestionEncounter[]
votes QuestionsQuestionVote[]
comments QuestionsQuestionComment[]
answers QuestionsAnswer[]
}
model QuestionsQuestionEncounter {
@ -238,7 +238,7 @@ model QuestionsQuestionComment {
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
question QuestionsQuestion @relation(fields: [questionId], references: [id], onDelete: Cascade)
questionCommentVotes QuestionsQuestionCommentVote[]
votes QuestionsQuestionCommentVote[]
}
model QuestionsQuestionCommentVote {
@ -250,7 +250,7 @@ model QuestionsQuestionCommentVote {
updatedAt DateTime @updatedAt
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
questionComment QuestionsQuestionComment @relation(fields: [questionCommentId], references: [id], onDelete: Cascade)
comment QuestionsQuestionComment @relation(fields: [questionCommentId], references: [id], onDelete: Cascade)
@@unique([questionCommentId, userId])
}
@ -265,8 +265,8 @@ model QuestionsAnswer {
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
question QuestionsQuestion @relation(fields: [questionId], references: [id], onDelete: Cascade)
answerVotes QuestionsAnswerVote[]
answerComments QuestionsAnswerComment[]
votes QuestionsAnswerVote[]
comments QuestionsAnswerComment[]
}
model QuestionsAnswerVote {
@ -293,7 +293,7 @@ model QuestionsAnswerComment {
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
answer QuestionsAnswer @relation(fields: [answerId], references: [id], onDelete: Cascade)
snswerCommentVotes QuestionsAnswerCommentVote[]
votes QuestionsAnswerCommentVote[]
}
model QuestionsAnswerCommentVote {
@ -305,7 +305,7 @@ model QuestionsAnswerCommentVote {
updatedAt DateTime @updatedAt
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
answerComment QuestionsAnswerComment @relation(fields: [answerCommentId], references: [id], onDelete: Cascade)
comment QuestionsAnswerComment @relation(fields: [answerCommentId], references: [id], onDelete: Cascade)
@@unique([answerCommentId, userId])
}

Loading…
Cancel
Save