f6dc309a6ba03a5d37ac9325561eb21500ba7c5c
[motion2.git] / server / api / cmCustomField / cmCustomField.attributes.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xaa19=['ENUM','sequelize','lodash','exports','VIRTUAL','getDataValue','STRING','setDataValue','alias','TEXT','long','type','values','stringify','BOOLEAN'];(function(_0x100e0c,_0x5523b8){var _0x4db1aa=function(_0x29f480){while(--_0x29f480){_0x100e0c['push'](_0x100e0c['shift']());}};_0x4db1aa(++_0x5523b8);}(_0xaa19,0x79));var _0x9aa1=function(_0x9d8da0,_0x2a5cf8){_0x9d8da0=_0x9d8da0-0x0;var _0xb07a50=_0xaa19[_0x9d8da0];return _0xb07a50;};'use strict';var Sequelize=require(_0x9aa1('0x0'));var _=require(_0x9aa1('0x1'));module[_0x9aa1('0x2')]={'name':{'type':Sequelize[_0x9aa1('0x3')],'get':function(_0x4af2e4){return this[_0x9aa1('0x4')]('alias');}},'alias':{'type':Sequelize[_0x9aa1('0x5')],'allowNull':![],'set':function(_0x58fb46){this[_0x9aa1('0x6')](_0x9aa1('0x7'),_0x58fb46?_0x58fb46:this[_0x9aa1('0x4')]('name'));}},'type':{'type':Sequelize[_0x9aa1('0x5')],'allowNull':![]},'values':{'type':Sequelize[_0x9aa1('0x8')](_0x9aa1('0x9')),'get':function(){if(this['getDataValue'](_0x9aa1('0xa'))==='select'){return JSON['parse'](this[_0x9aa1('0x4')](_0x9aa1('0xb')));}else{return this[_0x9aa1('0x4')](_0x9aa1('0xb'));}},'set':function(_0x48448b){if(Array['isArray'](_0x48448b)){this[_0x9aa1('0x6')]('values',JSON[_0x9aa1('0xc')](_0x48448b));}else{this['setDataValue']('values',_0x48448b);}}},'required':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'clickToAction':{'type':Sequelize[_0x9aa1('0xd')],'defaultValue':![]},'actionType':{'type':Sequelize[_0x9aa1('0xe')]('voice')}};