@itleanchatbot/shared-models-js-postgres 1.1.90 → 1.2.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -58,6 +58,7 @@ const inactivityTriggers = require('./src/inactivityTriggers')
58
58
  const apiKeys = require('./src/apiKeys')
59
59
  const customPostbacks = require('./src/customPostbacks')
60
60
  const transhipInactivityTriggers = require('./src/transhipInactivityTriggers')
61
+ const stopwords = require('./src/stopwords')
61
62
 
62
63
  module.exports = {
63
64
  openFaqs,
@@ -119,5 +120,6 @@ module.exports = {
119
120
  inactivityTriggers,
120
121
  apiKeys,
121
122
  customPostbacks,
122
- transhipInactivityTriggers
123
+ transhipInactivityTriggers,
124
+ stopwords
123
125
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itleanchatbot/shared-models-js-postgres",
3
- "version": "1.1.90",
3
+ "version": "1.2.91",
4
4
  "description": "Shared Models JS Postgres",
5
5
  "main": "index.js",
6
6
  "license": "ISC",
@@ -0,0 +1,47 @@
1
+
2
+ const StopwordsModel = (sequelize, types) => {
3
+ const Stopwords = sequelize.define('Stopwords', {
4
+ id: {
5
+ allowNull: false,
6
+ defaultValue: Sequelize.literal('uuid_generate_v4()'),
7
+ primaryKey: true,
8
+ type: types.UUID,
9
+ },
10
+ SkillId: {
11
+ allowNull: true,
12
+ type: types.UUID,
13
+ references: {
14
+ model: 'Skills',
15
+ key: 'id',
16
+ },
17
+ onDelete: 'SET NULL',
18
+ onUpdate: 'CASCADE',
19
+ },
20
+ EnterpriseId: {
21
+ allowNull: true,
22
+ type: types.UUID,
23
+ references: {
24
+ model: 'Enterprises',
25
+ key: 'id',
26
+ },
27
+ onDelete: 'SET NULL',
28
+ onUpdate: 'CASCADE',
29
+ },
30
+ words: {
31
+ allowNull: false,
32
+ type: types.ARRAY(types.STRING),
33
+ },
34
+ })
35
+
36
+ Stopwords.associate = models => {
37
+ Stopwords.belongsTo(models.Skill)
38
+ Stopwords.belongsTo(models.Enterprises)
39
+ }
40
+
41
+ return Stopwords
42
+ }
43
+
44
+ module.exports = {
45
+ StopwordsModel
46
+ }
47
+