mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 12:19:16 +00:00
feat: added user association to queues
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
|
||||
import Contact from "./Contact";
|
||||
import Message from "./Message";
|
||||
import Queue from "./Queue";
|
||||
import User from "./User";
|
||||
import Whatsapp from "./Whatsapp";
|
||||
|
||||
@@ -64,6 +65,13 @@ class Ticket extends Model<Ticket> {
|
||||
@BelongsTo(() => Whatsapp)
|
||||
whatsapp: Whatsapp;
|
||||
|
||||
@ForeignKey(() => Queue)
|
||||
@Column
|
||||
queueId: number;
|
||||
|
||||
@BelongsTo(() => Queue)
|
||||
queue: Queue;
|
||||
|
||||
@HasMany(() => Message)
|
||||
messages: Message[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user