mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-18 11:49:19 +00:00
27 lines
430 B
JavaScript
27 lines
430 B
JavaScript
const Sequelize = require("sequelize");
|
|
|
|
class ContactCustomField extends Sequelize.Model {
|
|
static init(sequelize) {
|
|
super.init(
|
|
{
|
|
name: { type: Sequelize.STRING },
|
|
value: { type: Sequelize.STRING },
|
|
},
|
|
{
|
|
sequelize,
|
|
}
|
|
);
|
|
|
|
return this;
|
|
}
|
|
|
|
static associate(models) {
|
|
this.belongsTo(models.Contact, {
|
|
foreignKey: "contactId",
|
|
as: "extraInfo",
|
|
});
|
|
}
|
|
}
|
|
|
|
module.exports = ContactCustomField;
|