-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathrules.js
More file actions
33 lines (29 loc) · 799 Bytes
/
rules.js
File metadata and controls
33 lines (29 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
* rules stores the set of json objects that define Template Strings for error feedback
* Uses {{p1}}, {{p2}}, and {{p3}} as replacement macros. Stored in multiple languages.
*/
module.exports = function(sequelize, db) {
const r = sequelize.define("rules",
{
id: {
type: db.TEXT,
primaryKey: true
},
// type of Rule (CONTAINS, CSS_CONTAINS, etc)
type: db.TEXT,
// english error message, using p1-p3 as replacements in template string
error_msg: db.TEXT,
// pt error message, and so on.
pt_error_msg: db.TEXT,
error_msg_2: db.TEXT,
pt_error_msg_2: db.TEXT,
error_msg_3: db.TEXT,
pt_error_msg_3: db.TEXT
},
{
freezeTableName: true,
timestamps: false
}
);
return r;
};