diff options
Diffstat (limited to 'db/models')
| -rw-r--r-- | db/models/keys.js | 39 | ||||
| -rw-r--r-- | db/models/users.js | 9 |
2 files changed, 48 insertions, 0 deletions
diff --git a/db/models/keys.js b/db/models/keys.js new file mode 100644 index 00000000..1a2a84ae --- /dev/null +++ b/db/models/keys.js @@ -0,0 +1,39 @@ +const { DataTypes } = require('sequelize'); + +const attributes = { + id: { + type: DataTypes.INTEGER(11), + allowNull: false, + defaultValue: null, + primaryKey: true, + autoIncrement: true, + comment: null, + field: "id" + }, + user_id: { + type: DataTypes.INTEGER(11), + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "user_id" + }, + hex: { + type: DataTypes.STRING(255), + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "hex" + }, +}; + +const options = { + tableName: "linkingkeys", + comment: "", + indexes: [] +}; + +db["Key"] = db.define("keys_model", attributes, options); diff --git a/db/models/users.js b/db/models/users.js index 1c16f737..5d4f33ae 100644 --- a/db/models/users.js +++ b/db/models/users.js @@ -19,6 +19,15 @@ const attributes = { comment: null, field: "ip" }, + seed: { + type: DataTypes.STRING(255), + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "seed" + }, username: { type: DataTypes.STRING(255), allowNull: true, |
