Built motion from commit d3a776a.|0.0.126
[motion.git] / server / models / settings.js
index 6388fe5..58e29a4 100644 (file)
@@ -1 +1,52 @@
-var _0x222c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x53\x65\x74\x74\x69\x6E\x67\x73","\x54\x45\x58\x54","\x73\x65\x74\x74\x69\x6E\x67\x73","\x64\x65\x66\x69\x6E\x65"];_0x222c[0];module[_0x222c[1]]=function(_0x11d0x1,_0x11d0x2){var _0x11d0x3=_0x11d0x1[_0x222c[5]](_0x222c[2],{license:_0x11d0x2[_0x222c[3]],mac:{type:_0x11d0x2.STRING(17),allowNull:false,validate:{notEmpty:true}},netmask:{type:_0x11d0x2.STRING(15),allowNull:false,validate:{notEmpty:true,isIP:true}},address:{type:_0x11d0x2.STRING(15),allowNull:false,validate:{notEmpty:true,isIP:true}},min_internal:{type:_0x11d0x2.INTEGER(11),unique:true},agi_port:{type:_0x11d0x2.INTEGER(11)},automation_timeout:{type:_0x11d0x2.INTEGER(11),defaultValue:3600}},{tableName:_0x222c[4]});return _0x11d0x3;};
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var Settings = sequelize.define('Settings', {
+    min_internal: {
+      type: DataTypes.INTEGER(11),
+      unique: true,
+      defaultValue: 1000
+    },
+    min_mailbox: {
+      type: DataTypes.INTEGER(11),
+      unique: true,
+      defaultValue: 1000
+    },
+    agi_port: {
+      type: DataTypes.INTEGER(11),
+      defaultValue: 4573
+    },
+    soundPath: {
+      type: DataTypes.STRING,
+      defaultValue: '/var/opt/motion/server/files/sounds/converted'
+    },
+    logo: {
+      type: DataTypes.STRING
+    },
+    defaultLogo: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: true
+    },
+    loginLogo: {
+      type: DataTypes.STRING
+    },
+    defaultLoginLogo: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: true
+    },
+    footerWhiteLabel: {
+      type: DataTypes.STRING
+    },
+    defaultFooterWhiteLabel: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: true
+    }
+
+  }, {
+    tableName: 'settings'
+  });
+
+  return Settings;
+
+};