From 79c9febb88035422e950349b214cc1fc1a4ab615 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 16 Jul 2020 12:06:25 -0700 Subject: url codes --- db/models/codes.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 db/models/codes.js (limited to 'db/models/codes.js') 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); -- cgit v1.2.3