mirror of
https://framagit.org/les/gancio.git
synced 2025-02-01 09:02:01 +01:00
19 lines
406 B
JavaScript
19 lines
406 B
JavaScript
'use strict'
|
|
module.exports = (sequelize, DataTypes) => {
|
|
const Instance = sequelize.define('instance', {
|
|
domain: {
|
|
primaryKey: true,
|
|
allowNull: false,
|
|
type: DataTypes.STRING
|
|
},
|
|
name: DataTypes.STRING,
|
|
blocked: DataTypes.BOOLEAN,
|
|
data: DataTypes.JSON
|
|
}, {})
|
|
|
|
Instance.associate = function (models) {
|
|
Instance.hasMany(models.ap_user)
|
|
}
|
|
|
|
return Instance
|
|
}
|