'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _sequelize = require('sequelize');

var _sequelize2 = _interopRequireDefault(_sequelize);

var _sequelize3 = require('./../utils/sequelize');

var _sequelize4 = _interopRequireDefault(_sequelize3);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/*
 * *******************************************************************************
 *  * Copyright (c) 2018 Edgeworx, Inc.
 *  *
 *  * This program and the accompanying materials are made available under the
 *  * terms of the Eclipse Public License v. 2.0 which is available at
 *  * http://www.eclipse.org/legal/epl-2.0
 *  *
 *  * SPDX-License-Identifier: EPL-2.0
 *  *******************************************************************************
 *
 */

/**
 * @file sslFiles.js
 * @author Zishan Iqbal
 * @description This file includes a element model used by sequalize for ORM;
 */

var elementInstancesLayouts = _sequelize4.default.define('element_instances_layouts', {
  id: {
    type: _sequelize2.default.INTEGER,
    primaryKey: true,
    autoIncrement: true,
    field: 'ID'
  },
  elementInstanceUuid: {
    type: _sequelize2.default.TEXT,
    field: 'element_instance_uuid'
  },
  isSelected: {
    type: _sequelize2.default.INTEGER,
    field: 'is_selected'
  },
  layoutX: {
    type: _sequelize2.default.BIGINT,
    field: 'layout_x'
  },
  layoutY: {
    type: _sequelize2.default.BIGINT,
    field: 'layout_y'
  }
}, {
  // don't add the timestamp attributes (updatedAt, createdAt)
  timestamps: false,
  // disable the modification of table names
  freezeTableName: true,
  // don't use camelcase for automatically added attributes but underscore style
  // so updatedAt will be updated_at
  underscored: true
});

exports.default = elementInstancesLayouts;