'use strict' /** * Copyright (c) 2018, OBCon Inc. * All rights reserved. */ /** * @file * @copyright OBCon Inc. Korea 2018 * @author gye hyun james kim [pnuskgh@gmail.com] */ //--- http://docs.sequelizejs.com/ let Sequelize = require('sequelize'); let Model = utils.getClass('include', 'model.js'); class MapLinesModel extends Model { constructor() { super(); this._title = '지도 경로'; this._database = db.db_scada; this._tableName = 'mapLine'; } get fields() { let fields = Object.assign({ site: { type: Sequelize.INTEGER(11), allowNull: false, defaultValue: 1, validate: { }, title: '사이트', strType: 'integer' }, branch: { //--- 지사 ID type: Sequelize.INTEGER(11), allowNull: true, validate: { }, title: '지사', strType: 'integer' }, path: { //--- 경로 type: Sequelize.STRING(1024), allowNull: true, defaultValue: '[]', validate: { }, title: '경로', strType: 'string' }, color: { //--- 경로의 색상 type: Sequelize.STRING(32), allowNull: true, defaultValue: '[ 0, 100, 0, 0.7 ]', validate: { }, title: '색상', strType: 'string' }, width: { //--- 경로의 두께 type: Sequelize.INTEGER(2), allowNull: true, defaultValue: 2, validate: { }, title: '두께', strType: 'integer' }, }, super.fields); return fields; } } module.exports = MapLinesModel;