mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-20 04:39:20 +00:00
maintenance commit
This commit is contained in:
@@ -5,17 +5,15 @@ const sequelize = require("../util/database");
|
||||
const Message = require("./Message");
|
||||
|
||||
const Contact = sequelize.define("contact", {
|
||||
id: {
|
||||
type: Sequelize.INTEGER,
|
||||
allowNull: false,
|
||||
primaryKey: true,
|
||||
autoIncrement: true,
|
||||
},
|
||||
name: { type: Sequelize.STRING(100), allowNull: false },
|
||||
number: { type: Sequelize.STRING(15), allowNull: false },
|
||||
imageURL: { type: Sequelize.STRING(200) },
|
||||
ateraId: Sequelize.INTEGER(),
|
||||
});
|
||||
|
||||
Contact.hasMany(Message);
|
||||
Contact.hasMany(Message, {
|
||||
onDelete: "CASCADE",
|
||||
onUpdate: "RESTRICT",
|
||||
});
|
||||
|
||||
module.exports = Contact;
|
||||
|
||||
Reference in New Issue
Block a user