aboutsummaryrefslogtreecommitdiffstats
path: root/db/models/codes.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-07-16 12:06:25 -0700
committerAdam Soltys <[email protected]>2020-07-16 12:06:25 -0700
commit79c9febb88035422e950349b214cc1fc1a4ab615 (patch)
treec2e2b82dda2185508ec26932780bf2bbfef906e7 /db/models/codes.js
parentdabde17d34eda659292382343026382907b76fe4 (diff)
downloadcoinos-server-79c9febb88035422e950349b214cc1fc1a4ab615.tar.gz
coinos-server-79c9febb88035422e950349b214cc1fc1a4ab615.zip
url codes
Diffstat (limited to 'db/models/codes.js')
-rw-r--r--db/models/codes.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/db/models/codes.js b/db/models/codes.js
new file mode 100644
index 00000000..9d967d11
--- /dev/null
+++ b/db/models/codes.js
@@ -0,0 +1,31 @@
+const { DataTypes } = require('sequelize');
+
+const attributes = {
+ code: {
+ type: DataTypes.STRING(64),
+ allowNull: false,
+ defaultValue: null,
+ primaryKey: true,
+ autoIncrement: true,
+ comment: null,
+ field: "code"
+ },
+ text: {
+ type: DataTypes.TEXT,
+ allowNull: true,
+ defaultValue: null,
+ primaryKey: false,
+ autoIncrement: false,
+ comment: null,
+ field: "text"
+ },
+};
+
+const options = {
+ tableName: "codes",
+ comment: "",
+ indexes: [],
+ timestamps: false
+};
+
+db["Code"] = db.define("codes_model", attributes, options);