Built motion from commit 853f83e.|0.0.61
[motion.git] / server / models / user.js
1 var _0x1cc9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x63\x72\x79\x70\x74\x6F","\x6D\x64\x35","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E","\x65\x78\x70\x6F\x72\x74\x73","\x55\x73\x65\x72","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x64\x65\x66\x61\x75\x6C\x74\x75\x73\x65\x72","\x65\x6D\x61\x69\x6C","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x61\x67\x65\x6E\x74","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x73\x61\x6C\x74","\x6D\x61\x6B\x65\x53\x61\x6C\x74","\x70\x61\x73\x73\x77\x6F\x72\x64","\x65\x6E\x63\x72\x79\x70\x74\x50\x61\x73\x73\x77\x6F\x72\x64","\x6D\x64\x35\x73\x65\x63\x72\x65\x74","\x3A\x61\x73\x74\x65\x72\x69\x73\x6B\x3A","\x6D\x64\x35\x50\x61\x73\x73\x77\x6F\x72\x64","\x6C\x6F\x63\x61\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x42\x4F\x4F\x4C\x45\x41\x4E","\x44\x41\x54\x45","\x55\x4E\x4B\x4E\x4F\x57\x4E","\x44\x65\x66\x61\x75\x6C\x74\x20\x50\x61\x75\x73\x65","\x49\x4E\x54\x45\x47\x45\x52","\x70\x68\x6F\x6E\x65\x42\x61\x72\x55\x6E\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x61\x6C","\x67\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x70\x68\x6F\x6E\x65\x42\x61\x72\x55\x6E\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x61\x6C\x4E\x75\x6D\x62\x65\x72","\x70\x68\x6F\x6E\x65\x42\x61\x72\x4E\x6F\x52\x65\x70\x6C\x79","\x70\x68\x6F\x6E\x65\x42\x61\x72\x4E\x6F\x52\x65\x70\x6C\x79\x4E\x75\x6D\x62\x65\x72","\x70\x68\x6F\x6E\x65\x42\x61\x72\x42\x75\x73\x79","\x70\x68\x6F\x6E\x65\x42\x61\x72\x42\x75\x73\x79\x4E\x75\x6D\x62\x65\x72","\x66\x72\x69\x65\x6E\x64","\x70\x65\x65\x72","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x4E\x4F\x54\x5F\x53\x43\x52\x45\x45\x4E\x45\x44","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x50\x41\x53\x53\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x46\x41\x49\x4C\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x41\x4C\x4C\x4F\x57\x45\x44","\x50\x52\x4F\x48\x49\x42\x5F\x4E\x4F\x54\x5F\x53\x43\x52\x45\x45\x4E\x45\x44","\x50\x52\x4F\x48\x49\x42\x5F\x50\x41\x53\x53\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x50\x52\x4F\x48\x49\x42\x5F\x46\x41\x49\x4C\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x50\x52\x4F\x48\x49\x42","\x75\x64\x70","\x72\x66\x63\x32\x38\x33\x33","\x69\x6E\x66\x6F","\x73\x68\x6F\x72\x74\x69\x6E\x66\x6F","\x69\x6E\x62\x61\x6E\x64","\x61\x75\x74\x6F","\x79\x65\x73","\x6E\x6F","\x6E\x6F\x6E\x61\x74","\x75\x70\x64\x61\x74\x65","\x66\x6F\x72\x63\x65\x5F\x72\x70\x6F\x72\x74\x2C\x63\x6F\x6D\x65\x64\x69\x61","\x65\x6E","\x61\x6C\x61\x77\x3B\x75\x6C\x61\x77\x3B\x67\x73\x6D","\x70\x6F\x72\x74\x2C\x69\x6E\x76\x69\x74\x65","\x6E\x65\x76\x65\x72","\x22\x22\x20\x3C\x3E","\x61\x6C\x77\x61\x79\x73","\x61\x63\x63\x65\x70\x74","\x72\x65\x66\x75\x73\x65","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65","\x75\x61\x63","\x75\x61\x73","\x64\x79\x6E\x61\x6D\x69\x63","\x66\x69\x6E\x67\x65\x72\x70\x72\x69\x6E\x74","\x63\x65\x72\x74\x69\x66\x69\x63\x61\x74\x65","\x61\x63\x74\x69\x76\x65","\x70\x61\x73\x73\x69\x76\x65","\x61\x63\x74\x70\x61\x73\x73","\x75\x73\x65\x72\x73","\x62\x61\x73\x65\x36\x34","\x72\x61\x6E\x64\x6F\x6D\x42\x79\x74\x65\x73","","\x70\x62\x6B\x64\x66\x32\x53\x79\x6E\x63","\x68\x61\x73\x4D\x61\x6E\x79","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x6F\x64\x75\x6C\x65\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F\x4D\x61\x6E\x79","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73","\x55\x73\x65\x72\x48\x61\x73\x54\x65\x61\x6D","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x53\x65\x72\x76\x69\x63\x65","\x55\x73\x65\x72\x49\x64","\x55\x73\x65\x72\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x63\x61\x73\x63\x61\x64\x65","\x61\x64\x64\x53\x63\x6F\x70\x65","\x71\x75\x65\x75\x65\x73","\x63\x68\x65\x63\x6B\x50\x61\x75\x73\x65\x53\x74\x61\x74\x75\x73","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65","\x77\x68\x65\x72\x65","\x74\x72\x75\x65","\x66\x61\x78\x50\x61\x75\x73\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x63\x68\x65\x63\x6B\x4F\x6E\x6C\x69\x6E\x65\x53\x74\x61\x74\x75\x73","\x6F\x6E\x6C\x69\x6E\x65","\x63\x68\x65\x63\x6B\x53\x69\x70\x53\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73","\x69\x64","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x74\x72\x61\x6E\x73\x70\x6F\x72\x74","\x68\x6F\x73\x74","\x6E\x61\x74","\x74\x79\x70\x65","\x61\x6C\x6C\x6F\x77","\x63\x68\x61\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x6D\x61\x69\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x66\x61\x78\x43\x61\x70\x61\x63\x69\x74\x79","\x6C\x61\x73\x74\x4C\x6F\x67\x69\x6E\x41\x74","\x70\x68\x6F\x6E\x65\x42\x61\x72\x41\x75\x74\x6F\x41\x6E\x73\x77\x65\x72","\x70\x68\x6F\x6E\x65\x42\x61\x72\x45\x6E\x61\x62\x6C\x65\x53\x65\x74\x74\x69\x6E\x67\x73","\x63\x68\x61\x6E\x73\x70\x79","\x70\x61\x75\x73\x65\x54\x79\x70\x65","\x6C\x61\x73\x74\x50\x61\x75\x73\x65\x41\x74","\x73\x74\x61\x74\x75\x73\x41\x74","\x64\x65\x66\x69\x6E\x65"];_0x1cc9[0];var crypto=require(_0x1cc9[1]);var md5=require(_0x1cc9[2]);var _=require(_0x1cc9[3]);var moment=require(_0x1cc9[4]);var VoiceQueue=require(_0x1cc9[6])[_0x1cc9[5]];module[_0x1cc9[7]]=function(_0x8afcx6,_0x8afcx7){var _0x8afcx8=_0x8afcx6[_0x1cc9[129]](_0x1cc9[8],{name:{type:_0x8afcx7[_0x1cc9[9]],unique:true,validate:{notEmpty:true,is:/^[A-Za-z0-9\.\_]+$/i},set:function(_0x8afcx9){this[_0x1cc9[11]](_0x1cc9[10],_0x8afcx9);this[_0x1cc9[11]](_0x1cc9[12],_0x8afcx9)}},fullname:{type:_0x8afcx7[_0x1cc9[9]],allowNull:false},email:{type:_0x8afcx7[_0x1cc9[9]],unique:true,set:function(_0x8afcxa){if(_0x8afcxa){this[_0x1cc9[11]](_0x1cc9[13],_0x8afcxa[_0x1cc9[14]]())}},defaultValue:null},role:{type:_0x8afcx7.ENUM(_0x1cc9[15],_0x1cc9[16],_0x1cc9[17],_0x1cc9[18])},password:{type:_0x8afcx7[_0x1cc9[9]],allowNull:false,validate:{notEmpty:true},set:function(_0x8afcxb){this[_0x1cc9[19]]=this[_0x1cc9[20]]();this[_0x1cc9[11]](_0x1cc9[21],this[_0x1cc9[22]](_0x8afcxb));this[_0x1cc9[11]](_0x1cc9[23],this[_0x1cc9[25]](this[_0x1cc9[10]]+_0x1cc9[24]+_0x8afcxb))}},provider:{type:_0x8afcx7[_0x1cc9[9]],defaultValue:_0x1cc9[26]},internal:{type:_0x8afcx7.INTEGER(11),unique:true,set:function(_0x8afcxc){this[_0x1cc9[11]](_0x1cc9[27],_0x8afcxc);this[_0x1cc9[11]](_0x1cc9[28],_0x8afcxc)}},salt:{type:_0x8afcx7[_0x1cc9[9]]},phone:{type:_0x8afcx7[_0x1cc9[9]]},mobile:{type:_0x8afcx7[_0x1cc9[9]]},address:{type:_0x8afcx7[_0x1cc9[9]]},zipcode:{type:_0x8afcx7[_0x1cc9[9]]},userpic:{type:_0x8afcx7[_0x1cc9[9]]},city:{type:_0x8afcx7[_0x1cc9[9]]},country:{type:_0x8afcx7[_0x1cc9[9]]},online:{type:_0x8afcx7[_0x1cc9[29]],defaultValue:false},lastLoginAt:{type:_0x8afcx7[_0x1cc9[30]]},status:{type:_0x8afcx7[_0x1cc9[9]],defaultValue:_0x1cc9[31]},statusAt:{type:_0x8afcx7[_0x1cc9[30]]},voicePause:{type:_0x8afcx7[_0x1cc9[29]],defaultValue:false},chatPause:{type:_0x8afcx7[_0x1cc9[29]],defaultValue:false},mailPause:{type:_0x8afcx7[_0x1cc9[29]],defaultValue:false},faxPause:{type:_0x8afcx7[_0x1cc9[29]],defaultValue:false},pauseType:{type:_0x8afcx7[_0x1cc9[9]],defaultValue:_0x1cc9[32]},lastPauseAt:{type:_0x8afcx7[_0x1cc9[30]]},chatCapacity:{type:_0x8afcx7[_0x1cc9[33]],defaultValue:0},mailCapacity:{type:_0x8afcx7[_0x1cc9[33]],defaultValue:0},faxCapacity:{type:_0x8afcx7[_0x1cc9[33]],defaultValue:0},phoneBarAutoAnswer:{type:_0x8afcx7[_0x1cc9[29]],defaultValue:false},phoneBarEnableSettings:{type:_0x8afcx7[_0x1cc9[29]],defaultValue:false},phoneBarUnconditionalNumber:{type:_0x8afcx7[_0x1cc9[9]],get:function(){if(this[_0x1cc9[35]](_0x1cc9[34])){return this[_0x1cc9[35]](_0x1cc9[36])};return null}},phoneBarNoReplyNumber:{type:_0x8afcx7[_0x1cc9[9]],get:function(){if(this[_0x1cc9[35]](_0x1cc9[37])){return this[_0x1cc9[35]](_0x1cc9[38])};return null}},phoneBarBusyNumber:{type:_0x8afcx7[_0x1cc9[9]],get:function(){if(this[_0x1cc9[35]](_0x1cc9[39])){return this[_0x1cc9[35]](_0x1cc9[40])};return null}},phoneBarUnconditional:{type:_0x8afcx7[_0x1cc9[29]],defaultValue:false},phoneBarNoReply:{type:_0x8afcx7[_0x1cc9[29]],defaultValue:false},phoneBarBusy:{type:_0x8afcx7[_0x1cc9[29]],defaultValue:false},phoneBarPort:{type:_0x8afcx7.INTEGER(5),allowNull:true},chanspy:{type:_0x8afcx7[_0x1cc9[29]],defaultValue:false},description:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},ipaddr:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},port:{type:_0x8afcx7.INTEGER(5),allowNull:true},regseconds:{type:_0x8afcx7.INTEGER(11),allowNull:true},fullcontact:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},regserver:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},useragent:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},lastms:{type:_0x8afcx7.INTEGER(11),allowNull:true},type:{type:_0x8afcx7.ENUM(_0x1cc9[41],_0x1cc9[16],_0x1cc9[42]),allowNull:true,defaultValue:_0x1cc9[41]},context:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true,defaultValue:_0x1cc9[43]},callingpres:{type:_0x8afcx7.ENUM(_0x1cc9[44],_0x1cc9[45],_0x1cc9[46],_0x1cc9[47],_0x1cc9[48],_0x1cc9[49],_0x1cc9[50],_0x1cc9[51]),allowNull:true},permit:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},deny:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},secret:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},md5secret:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},remotesecret:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},transport:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true,defaultValue:_0x1cc9[52]},dtmfmode:{type:_0x8afcx7.ENUM(_0x1cc9[53],_0x1cc9[54],_0x1cc9[55],_0x1cc9[56],_0x1cc9[57]),allowNull:true,defaultValue:_0x1cc9[53]},directmedia:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59],_0x1cc9[60],_0x1cc9[61]),allowNull:true,defaultValue:_0x1cc9[59]},nat:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true,defaultValue:_0x1cc9[62]},callgroup:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},namedcallgroup:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},pickupgroup:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},namedpickupgroup:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},language:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true,defaultValue:_0x1cc9[63]},tonezone:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},allow:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true,defaultValue:_0x1cc9[64]},disallow:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true,defaultValue:null},autoframing:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59]),allowNull:true},insecure:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true,defaultValue:_0x1cc9[65]},trustrpid:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59]),allowNull:true,defaultValue:_0x1cc9[59]},trust_id_outbound:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59]),allowNull:true,defaultValue:_0x1cc9[59]},progressinband:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59],_0x1cc9[66]),allowNull:true},promiscredir:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59]),allowNull:true},useclientcode:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59]),allowNull:true},accountcode:{type:_0x8afcx7.INTEGER(11),allowNull:true},setvar:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},callerid:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true,defaultValue:_0x1cc9[67]},amaflags:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},callcounter:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59]),allowNull:true,defaultValue:_0x1cc9[58]},busylevel:{type:_0x8afcx7.INTEGER(11),allowNull:true},allowoverlap:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59]),allowNull:true},allowsubscribe:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59]),allowNull:true},allowtransfer:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59]),allowNull:true},ignoresdpversion:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59]),allowNull:true},subscribecontext:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},template:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},videosupport:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59],_0x1cc9[68]),allowNull:true,defaultValue:_0x1cc9[59]},maxcallbitrate:{type:_0x8afcx7.INTEGER(11),allowNull:true},rfc2833compensate:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59]),allowNull:true},mailbox:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},session_timers:{type:_0x8afcx7.ENUM(_0x1cc9[69],_0x1cc9[70],_0x1cc9[71]),allowNull:true},session_expires:{type:_0x8afcx7.INTEGER(11),allowNull:true},session_minse:{type:_0x8afcx7.INTEGER(11),allowNull:true},session_refresher:{type:_0x8afcx7.ENUM(_0x1cc9[72],_0x1cc9[73]),allowNull:true,defaultValue:_0x1cc9[73]},t38pt_usertpsource:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},regexten:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},fromdomain:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},fromuser:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},host:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true,defaultValue:_0x1cc9[74]},qualify:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59]),allowNull:true,defaultValue:_0x1cc9[58]},keepalive:{type:_0x8afcx7.INTEGER(11),allowNull:true},defaultip:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},defaultuser:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},rtptimeout:{type:_0x8afcx7.INTEGER(11),allowNull:true},rtpholdtimeout:{type:_0x8afcx7.INTEGER(11),allowNull:true},rtpkeepalive:{type:_0x8afcx7.INTEGER(11),allowNull:true},sendrpid:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59]),allowNull:true,defaultValue:_0x1cc9[59]},outboundproxy:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},callbackextension:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},timert1:{type:_0x8afcx7.INTEGER(11),allowNull:true},timerb:{type:_0x8afcx7.INTEGER(11),allowNull:true},qualifyfreq:{type:_0x8afcx7.INTEGER(11),allowNull:true},contactpermit:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},contactdeny:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},contactacl:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},directmediapermit:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},directmediadeny:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},unsolicited_mailbox:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},use_q850_reason:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},maxforwards:{type:_0x8afcx7.INTEGER(11),allowNull:true},encryption:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59]),allowNull:true,defaultValue:_0x1cc9[59]},avpf:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59]),allowNull:true},force_avp:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59]),allowNull:true},icesupport:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59]),allowNull:true},dtlsenable:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59]),allowNull:true},dtlsverify:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59],_0x1cc9[75],_0x1cc9[76]),allowNull:true},dtlsrekey:{type:_0x8afcx7.INTEGER(11),allowNull:true},dtlscertfile:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},dtlsprivatekey:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},dtlscipher:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},dtlscafile:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},dtlscapath:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},dtlssetup:{type:_0x8afcx7.ENUM(_0x1cc9[77],_0x1cc9[78],_0x1cc9[79]),allowNull:true},dtlsfingerprint:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},usereqphone:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59]),allowNull:true,defaultValue:_0x1cc9[59]},recordonfeature:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},recordofffeature:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},call_limit:{type:_0x8afcx7.INTEGER(11),allowNull:true,defaultValue:null},registertrying:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59]),allowNull:true},subscribemwi:{type:_0x8afcx7.ENUM(_0x1cc9[58],_0x1cc9[59]),allowNull:true},vmexten:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},mohinterpret:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},mohsuggest:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true},parkinglot:{type:_0x8afcx7[_0x1cc9[9]],allowNull:true}},{tableName:_0x1cc9[80],instanceMethods:{authenticate:function(_0x8afcxd){return this[_0x1cc9[22]](_0x8afcxd)===this[_0x1cc9[21]]},makeSalt:function(){return crypto[_0x1cc9[82]](16).toString(_0x1cc9[81])},encryptPassword:function(_0x8afcxb){if(!_0x8afcxb||!this[_0x1cc9[19]]){return _0x1cc9[83]};var _0x8afcxe= new Buffer(this[_0x1cc9[19]],_0x1cc9[81]);return crypto[_0x1cc9[84]](_0x8afcxb,_0x8afcxe,10000,64).toString(_0x1cc9[81])},md5Password:function(_0x8afcxb){if(!_0x8afcxb){return _0x1cc9[83]};return md5(_0x8afcxb)}},associate:function(_0x8afcxf){_0x8afcx8[_0x1cc9[85]](_0x8afcxf.ChatMessage);_0x8afcx8[_0x1cc9[85]](_0x8afcxf.Contact);_0x8afcx8[_0x1cc9[85]](_0x8afcxf.Action);_0x8afcx8[_0x1cc9[87]](_0x8afcxf.Module,{through:_0x1cc9[86]});_0x8afcx8[_0x1cc9[87]](_0x8afcxf.Channel,{through:_0x1cc9[88]});_0x8afcx8[_0x1cc9[87]](_0x8afcxf.MailRoom,{through:_0x1cc9[89]});_0x8afcx8[_0x1cc9[87]](_0x8afcxf.Team,{through:_0x8afcxf[_0x1cc9[90]]});_0x8afcx8[_0x1cc9[87]](_0x8afcxf.ChatRoom,{through:_0x8afcxf[_0x1cc9[91]]});_0x8afcx8[_0x1cc9[87]](_0x8afcxf.MailQueue,{through:_0x8afcxf[_0x1cc9[92]]});_0x8afcx8[_0x1cc9[87]](_0x8afcxf.ChatQueue,{through:_0x8afcxf[_0x1cc9[93]]});_0x8afcx8[_0x1cc9[87]](_0x8afcxf.VoiceQueue,{through:_0x8afcxf[_0x1cc9[94]],required:false});_0x8afcx8[_0x1cc9[87]](_0x8afcxf.Service,{through:_0x8afcxf[_0x1cc9[95]]});_0x8afcx8[_0x1cc9[85]](_0x8afcxf.VoiceExtension,{foreignKey:_0x1cc9[96],as:_0x1cc9[97],onDelete:_0x1cc9[98],hooks:true});_0x8afcx8[_0x1cc9[99]](_0x1cc9[16],{where:{role:{$in:[_0x1cc9[15],_0x1cc9[16]]}}});_0x8afcx8[_0x1cc9[99]](_0x1cc9[100],{include:[_0x8afcxf[_0x1cc9[5]]]});_0x8afcx8[_0x1cc9[99]](_0x1cc9[18],{where:{role:_0x1cc9[18]}});_0x8afcx8[_0x1cc9[99]](_0x1cc9[101],function(_0x8afcx10){var _0x8afcx11={where:{}};if(_0x8afcx10[_0x1cc9[102]]){_0x8afcx11[_0x1cc9[103]][_0x1cc9[102]]=(_0x8afcx10[_0x1cc9[102]]===_0x1cc9[104])?true:false;delete _0x8afcx10[_0x1cc9[102]]}else {if(_0x8afcx10[_0x1cc9[105]]){_0x8afcx11[_0x1cc9[103]][_0x1cc9[105]]=(_0x8afcx10[_0x1cc9[105]]===_0x1cc9[104])?true:false;delete _0x8afcx10[_0x1cc9[105]]}else {if(_0x8afcx10[_0x1cc9[106]]){_0x8afcx11[_0x1cc9[103]][_0x1cc9[106]]=(_0x8afcx10[_0x1cc9[106]]===_0x1cc9[104])?true:false;delete _0x8afcx10[_0x1cc9[106]]}else {if(_0x8afcx10[_0x1cc9[107]]){_0x8afcx11[_0x1cc9[103]][_0x1cc9[107]]=(_0x8afcx10[_0x1cc9[107]]===_0x1cc9[104])?true:false;delete _0x8afcx10[_0x1cc9[107]]}}}};return _0x8afcx11});_0x8afcx8[_0x1cc9[99]](_0x1cc9[108],function(_0x8afcx10){var _0x8afcx11={where:{}};if(_0x8afcx10[_0x1cc9[109]]){_0x8afcx11[_0x1cc9[103]][_0x1cc9[109]]=(_0x8afcx10[_0x1cc9[109]]===_0x1cc9[104])?true:false;delete _0x8afcx10[_0x1cc9[109]]};return _0x8afcx11});_0x8afcx8[_0x1cc9[99]](_0x1cc9[110],function(_0x8afcx10){var _0x8afcx11={where:{}};if(_0x8afcx10[_0x1cc9[111]]){_0x8afcx11[_0x1cc9[103]][_0x1cc9[111]]=_0x8afcx10[_0x1cc9[111]];delete _0x8afcx10[_0x1cc9[111]]};return _0x8afcx11});_0x8afcx8[_0x1cc9[99]](_0x1cc9[17],{where:{role:_0x1cc9[17]},attributes:[_0x1cc9[112],_0x1cc9[10],_0x1cc9[13],_0x1cc9[27],_0x1cc9[113],_0x1cc9[28],_0x1cc9[114],_0x1cc9[115],_0x1cc9[116],_0x1cc9[117],_0x1cc9[118],_0x1cc9[119],_0x1cc9[120],_0x1cc9[121],_0x1cc9[109],_0x1cc9[122],_0x1cc9[123],_0x1cc9[124],_0x1cc9[34],_0x1cc9[37],_0x1cc9[39],_0x1cc9[36],_0x1cc9[38],_0x1cc9[40],_0x1cc9[125],_0x1cc9[102],_0x1cc9[107],_0x1cc9[105],_0x1cc9[106],_0x1cc9[126],_0x1cc9[127],_0x1cc9[111],_0x1cc9[128]]})}});return _0x8afcx8}