mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 12:19:16 +00:00
added new "last message" logic, before useReducer
This commit is contained in:
@@ -8,7 +8,7 @@ const Contact = sequelize.define("contact", {
|
||||
name: { type: Sequelize.STRING(100), allowNull: false },
|
||||
number: { type: Sequelize.STRING(15), allowNull: false },
|
||||
imageURL: { type: Sequelize.STRING(200) },
|
||||
ateraId: Sequelize.INTEGER(),
|
||||
lastMessage: { type: Sequelize.TEXT },
|
||||
});
|
||||
|
||||
Contact.hasMany(Message, {
|
||||
|
||||
@@ -13,7 +13,7 @@ const Message = sequelize.define("message", {
|
||||
},
|
||||
userId: { type: Sequelize.INTEGER, defaultValue: 0 },
|
||||
ack: { type: Sequelize.INTEGER, defaultValue: 0 },
|
||||
messageBody: { type: Sequelize.STRING(250), allowNull: false },
|
||||
messageBody: { type: Sequelize.TEXT, allowNull: false },
|
||||
read: { type: Sequelize.BOOLEAN, defaultValue: false },
|
||||
mediaUrl: { type: Sequelize.STRING(250) },
|
||||
mediaType: { type: Sequelize.STRING(250) },
|
||||
|
||||
Reference in New Issue
Block a user