99a18b76dc89815f84e16c7adf7087b6ae594c97
[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 _0xa8a3=['select','parse','values','isArray','BOOLEAN','sequelize','lodash','exports','alias','STRING','setDataValue','TEXT','long','getDataValue'];(function(_0x279d37,_0x14de3f){var _0x530173=function(_0x37fc79){while(--_0x37fc79){_0x279d37['push'](_0x279d37['shift']());}};_0x530173(++_0x14de3f);}(_0xa8a3,0x91));var _0x3a8a=function(_0x481c4d,_0x5aa6d8){_0x481c4d=_0x481c4d-0x0;var _0x5ba457=_0xa8a3[_0x481c4d];return _0x5ba457;};'use strict';var Sequelize=require(_0x3a8a('0x0'));var _=require(_0x3a8a('0x1'));module[_0x3a8a('0x2')]={'name':{'type':Sequelize['VIRTUAL'],'get':function(_0x44e293){return this['getDataValue'](_0x3a8a('0x3'));}},'alias':{'type':Sequelize[_0x3a8a('0x4')],'allowNull':![],'set':function(_0x2d0253){this[_0x3a8a('0x5')](_0x3a8a('0x3'),_0x2d0253?_0x2d0253:this['getDataValue']('name'));}},'type':{'type':Sequelize[_0x3a8a('0x4')],'allowNull':![]},'values':{'type':Sequelize[_0x3a8a('0x6')](_0x3a8a('0x7')),'get':function(){if(this[_0x3a8a('0x8')]('type')===_0x3a8a('0x9')){return JSON[_0x3a8a('0xa')](this[_0x3a8a('0x8')](_0x3a8a('0xb')));}else{return this[_0x3a8a('0x8')](_0x3a8a('0xb'));}},'set':function(_0x40ab0f){if(Array[_0x3a8a('0xc')](_0x40ab0f)){this[_0x3a8a('0x5')]('values',JSON['stringify'](_0x40ab0f));}else{this[_0x3a8a('0x5')](_0x3a8a('0xb'),_0x40ab0f);}}},'required':{'type':Sequelize[_0x3a8a('0xd')],'defaultValue':![]}};