Built motion from commit dec9cf4.|0.0.134
[motion.git] / server / models / openchannel_message.js
index d1c7859..5a25920 100644 (file)
@@ -8,12 +8,20 @@ module.exports = function(sequelize, DataTypes) {
     to: {
       type: DataTypes.STRING
     },
-    body: DataTypes.TEXT,
+    body: {
+      type: DataTypes.BLOB,
+      get: function() {
+        return this.getDataValue('body').toString();
+      }
+    },
     status: {
       type: DataTypes.STRING,
       defaultValue: 'SENDING'
     },
-    res_data: DataTypes.TEXT
+    res_data: DataTypes.TEXT,
+    name: DataTypes.STRING,
+    phone: DataTypes.STRING,
+    email: DataTypes.STRING,
   }, {
     tableName: 'openchannel_messages',
     associate: function(models) {