Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
fix(message): fix relations
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidRouyer committed Sep 8, 2023
1 parent 10d6cb5 commit bc54a36
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/database/schema/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ export const messages = pgTable('Message', {
});

export const messagesRelations = relations(messages, ({ one }) => ({
sender: one(tickets, {
sender: one(contacts, {
fields: [messages.senderId],
references: [contacts.id],
}),
ticket: one(tickets, {
fields: [messages.ticketId],
references: [tickets.id],
}),
Expand Down

0 comments on commit bc54a36

Please sign in to comment.