530834c0bf08c695801cfcbdc085fbe740d338da
[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 _0x919e=['select','values','isArray','stringify','BOOLEAN','ENUM','voice','sequelize','lodash','exports','STRING','setDataValue','alias','getDataValue','name','long'];(function(_0x49896f,_0x17f07a){var _0x1b6002=function(_0x14979c){while(--_0x14979c){_0x49896f['push'](_0x49896f['shift']());}};_0x1b6002(++_0x17f07a);}(_0x919e,0x1d7));var _0xe919=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x919e[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require(_0xe919('0x0'));var _=require(_0xe919('0x1'));module[_0xe919('0x2')]={'name':{'type':Sequelize['VIRTUAL'],'get':function(_0x115b01){return this['getDataValue']('alias');}},'alias':{'type':Sequelize[_0xe919('0x3')],'allowNull':![],'set':function(_0x3a1192){this[_0xe919('0x4')](_0xe919('0x5'),_0x3a1192?_0x3a1192:this[_0xe919('0x6')](_0xe919('0x7')));}},'type':{'type':Sequelize[_0xe919('0x3')],'allowNull':![]},'values':{'type':Sequelize['TEXT'](_0xe919('0x8')),'get':function(){if(this[_0xe919('0x6')]('type')===_0xe919('0x9')){return JSON['parse'](this[_0xe919('0x6')](_0xe919('0xa')));}else{return this[_0xe919('0x6')]('values');}},'set':function(_0x83759d){if(Array[_0xe919('0xb')](_0x83759d)){this[_0xe919('0x4')]('values',JSON[_0xe919('0xc')](_0x83759d));}else{this['setDataValue']('values',_0x83759d);}}},'required':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'clickToAction':{'type':Sequelize[_0xe919('0xd')],'defaultValue':![]},'actionType':{'type':Sequelize[_0xe919('0xe')](_0xe919('0xf'))}};