Built motion from commit 129fb4d95212661e48f0db455e75d668addbaddf. Version 3.0.0...
[motion-next.git] / server / api / mailMessage / mailMessage.model.js
index 91bd7be..094ed45 100644 (file)
@@ -1 +1 @@
-const a415_0x1429=['./mailMessage.attributes','mail_messages','out','define','secret','messageId','catch','direction','toLowerCase','models','lodash','utf8mb4_unicode_ci','isNil','then','html-to-text','error','update','get','plainBody','UserId','fti_mail_messages','subject','body','createdAt','MailMessage','exports'];(function(_0x5ff2bc,_0x1429ae){const _0x179afe=function(_0x2b5d50){while(--_0x2b5d50){_0x5ff2bc['push'](_0x5ff2bc['shift']());}};_0x179afe(++_0x1429ae);}(a415_0x1429,0x1bc));const a415_0x179a=function(_0x5ff2bc,_0x1429ae){_0x5ff2bc=_0x5ff2bc-0x0;let _0x179afe=a415_0x1429[_0x5ff2bc];return _0x179afe;};const _0x124ebc=a415_0x179a;'use strict';const _=require(_0x124ebc('0x8')),{htmlToText}=require(_0x124ebc('0xc')),attributes=require(_0x124ebc('0x18'));module[_0x124ebc('0x17')]=function(_0x2b5d50){const _0x30fbdc=_0x124ebc,_0x3f5b66=_0x2b5d50[_0x30fbdc('0x7')],_0x1c8877=_0x2b5d50[_0x30fbdc('0x1')](_0x30fbdc('0x16'),attributes,{'tableName':_0x30fbdc('0x19'),'paranoid':![],'indexes':[{'name':'messageId','fields':[_0x30fbdc('0x3')]},{'name':_0x30fbdc('0x12'),'fields':['plainBody',_0x30fbdc('0x13')],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'beforeCreate':function(_0x4b269e){const _0x1d384d=_0x30fbdc;_0x4b269e[_0x1d384d('0x14')]&&(_0x4b269e[_0x1d384d('0x10')]=htmlToText(_0x4b269e[_0x1d384d('0x14')],{'preserveNewlines':!![],'singleNewLineParagraphs':!![],'uppercaseHeadings':![],'noLinkBrackets':!![],'ignoreImage':!![]}));},'afterCreate':function(_0x5820ed){const _0x162c7d=_0x30fbdc,_0x2651a9=_0x5820ed[_0x162c7d('0xf')]({'plain':!![]});(_0x2651a9['direction']['toLowerCase']()==='in'||_0x2651a9['direction'][_0x162c7d('0x6')]()===_0x162c7d('0x0')&&!_0x2651a9[_0x162c7d('0x2')]&&!_[_0x162c7d('0xa')](_0x2651a9[_0x162c7d('0x11')]))&&_0x3f5b66['MailInteraction']['findOne']({'where':{'id':_0x2651a9['MailInteractionId']}})[_0x162c7d('0xb')](function(_0x475f8e){const _0x35fe0e=_0x162c7d;_0x475f8e&&_0x475f8e[_0x35fe0e('0xe')]({'lastMsgAt':_0x2651a9[_0x35fe0e('0x15')],'lastMsgDirection':_0x2651a9[_0x35fe0e('0x5')][_0x35fe0e('0x6')](),'lastMsgBody':_0x2651a9[_0x35fe0e('0x14')]});})[_0x162c7d('0x4')](function(_0x26aeb9){const _0x210199=_0x162c7d;console[_0x210199('0xd')](_0x26aeb9);});}},'charset':'utf8mb4','collate':_0x30fbdc('0x9')});return _0x1c8877;};
\ No newline at end of file
+const a499_0x19e3=['MailMessage','function','exports','sequelize','./mailMessage.attributes','init'];(function(_0x24d60d,_0x26047b){const _0x19e30d=function(_0x1f914c){while(--_0x1f914c){_0x24d60d['push'](_0x24d60d['shift']());}};_0x19e30d(++_0x26047b);}(a499_0x19e3,0x142));const a499_0x1f91=function(_0x24d60d,_0x26047b){_0x24d60d=_0x24d60d-0x10e;let _0x19e30d=a499_0x19e3[_0x24d60d];return _0x19e30d;};const a499_0x1f5760=a499_0x1f91;'use strict';const {Model}=require(a499_0x1f5760(0x113)),{attributes}=require(a499_0x1f5760(0x10e)),{options}=require('./mailMessage.options');class MailMessage extends Model{}function init(_0x1de7e5,_0xbee5be){const _0x115deb=a499_0x1f5760,_0x3309b3=options(_0x1de7e5),_0x14c394=typeof _0xbee5be===_0x115deb(0x111)?_0xbee5be(_0x3309b3):_0x3309b3;return MailMessage[_0x115deb(0x10f)](attributes,_0x14c394),MailMessage;}module[a499_0x1f5760(0x112)][a499_0x1f5760(0x110)]=MailMessage,module[a499_0x1f5760(0x112)]['init']=init;
\ No newline at end of file