summaryrefslogtreecommitdiff
path: root/src/routers/vault/models/evol/char_reg_num_db.js
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2020-03-27 23:31:00 -0400
committergumi <git@gumi.ca>2020-03-27 23:31:11 -0400
commitd83e4cb9a5d12230a1d255dcd2c9f167c5cc4751 (patch)
tree590d4cc94f6e0b8e79c7d6bd96d3bfa24b17843e /src/routers/vault/models/evol/char_reg_num_db.js
parent36fa6ec0227a6c2397c2059259b9b2a2a0983c1a (diff)
downloadapi-d83e4cb9a5d12230a1d255dcd2c9f167c5cc4751.tar.gz
api-d83e4cb9a5d12230a1d255dcd2c9f167c5cc4751.tar.bz2
api-d83e4cb9a5d12230a1d255dcd2c9f167c5cc4751.tar.xz
api-d83e4cb9a5d12230a1d255dcd2c9f167c5cc4751.zip
set the vault account id in an account variable
Diffstat (limited to 'src/routers/vault/models/evol/char_reg_num_db.js')
-rw-r--r--src/routers/vault/models/evol/char_reg_num_db.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/routers/vault/models/evol/char_reg_num_db.js b/src/routers/vault/models/evol/char_reg_num_db.js
new file mode 100644
index 0000000..a38df42
--- /dev/null
+++ b/src/routers/vault/models/evol/char_reg_num_db.js
@@ -0,0 +1,33 @@
+const { DataTypes } = require("sequelize"); // from npm registry
+
+module.exports = {
+ fields: {
+ charId: {
+ type: DataTypes.INTEGER.UNSIGNED,
+ primaryKey: true,
+ allowNull: false,
+ },
+ key: {
+ type: DataTypes.STRING.BINARY,
+ primaryKey: true,
+ allowNull: false,
+ },
+ index: {
+ type: DataTypes.INTEGER.UNSIGNED,
+ primaryKey: true,
+ allowNull: false,
+ defaultValue: 0,
+ },
+ value: {
+ type: DataTypes.INTEGER,
+ allowNull: false,
+ defaultValue: 0,
+ },
+ },
+ options: {
+ engine: "InnoDB",
+ indexes: [
+ { fields: ["char_id"] },
+ ],
+ }
+};