summaryrefslogblamecommitdiffstats
path: root/server/models/backend.js
blob: 62b936a3943a71522811a7828879ae7d83655ca0 (plain) (tree)
1
2
3
4
5
6
7
8
            


                                             



                             


                           

















                                   

                     

                                         
                                       


                
'use strict'
module.exports = (sequelize, DataTypes) => {
  var backend = sequelize.define('backend', {
    id: {
      allowNull: false,
      autoIncrement: true,
      primaryKey: true,
      type: DataTypes.INTEGER
    },
    name: DataTypes.STRING,
    type: DataTypes.STRING,
    credentials: {
      allowNull: false,
      type: DataTypes.STRING(2048),
      defaultValue: '[]'
    },
    groups: {
      allowNull: false,
      type: DataTypes.STRING(4096),
      defaultValue: '[]'
    },
    clients: {
      allowNull: false,
      type: DataTypes.STRING(4096),
      defaultValue: '[]'
    },
    sync: {
      type: DataTypes.STRING(1024)
    }
  }, {
    timestamps: false
  })
  backend.associate = function (models) {
    // associations can be defined here
  }
  return backend
}