From d6af21064d106e6179d76e0dddee049c5e7c0fc5 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 23 Jun 2020 14:39:41 -0700 Subject: lnurl auth --- db/models/keys.js | 39 +++++++++++++++++++++++++++++++++++++++ db/models/users.js | 9 +++++++++ 2 files changed, 48 insertions(+) create mode 100644 db/models/keys.js (limited to 'db/models') 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, -- cgit v1.2.3