improvement: moved vcard parse logic to backend

This commit is contained in:
canove
2020-10-04 14:05:32 -03:00
parent ec9fbee7d3
commit 315dbac175
8 changed files with 175 additions and 68 deletions

View File

@@ -10,6 +10,7 @@ import {
BelongsTo,
ForeignKey
} from "sequelize-typescript";
import Contact from "./Contact";
import Ticket from "./Ticket";
@Table
@@ -64,6 +65,20 @@ class Message extends Model<Message> {
@BelongsTo(() => Ticket)
ticket: Ticket;
@ForeignKey(() => Contact)
@Column
contactId: number;
@BelongsTo(() => Contact, "contactId")
contact: Contact;
@ForeignKey(() => Contact)
@Column
vcardContactId: number;
@BelongsTo(() => Contact, "vcardContactId")
vcardContact: Contact;
}
export default Message;