aboutsummaryrefslogtreecommitdiffstats
path: root/db/models
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-06-23 14:39:41 -0700
committerAdam Soltys <[email protected]>2020-06-23 14:39:41 -0700
commitd6af21064d106e6179d76e0dddee049c5e7c0fc5 (patch)
treed6cf57a7659a6e60ad80992c8f93dcc59c11c770 /db/models
parent3c46dc86b753cdfd71da7b8bb86710032668b5eb (diff)
downloadcoinos-server-d6af21064d106e6179d76e0dddee049c5e7c0fc5.tar.gz
coinos-server-d6af21064d106e6179d76e0dddee049c5e7c0fc5.zip
lnurl auth
Diffstat (limited to 'db/models')
-rw-r--r--db/models/keys.js39
-rw-r--r--db/models/users.js9
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,