summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-04-22 13:09:17 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-04-22 13:09:17 +0200
commitc10a7c594b89de94ddcf4b8396971d4fec2203db (patch)
treec935cd7d69dc4b0cb5483cd81d1d25c0b146bf41
parentdcc6b3cbb22857358e775d25056dbc2e1785f6a9 (diff)
downloadorm-c10a7c594b89de94ddcf4b8396971d4fec2203db.tar.gz
orm-c10a7c594b89de94ddcf4b8396971d4fec2203db.zip
Revert "accidentally deleted items"
This reverts commit dcc6b3cbb22857358e775d25056dbc2e1785f6a9.
-rw-r--r--models/item.js45
1 files changed, 45 insertions, 0 deletions
diff --git a/models/item.js b/models/item.js
new file mode 100644
index 0000000..0168c1b
--- /dev/null
+++ b/models/item.js
@@ -0,0 +1,45 @@
+/* jshint indent: 2 */
+
+module.exports = function(sequelize, DataTypes) {
+ return sequelize.define('item', {
+ id: {
+ type: DataTypes.INTEGER(10).UNSIGNED,
+ allowNull: false,
+ primaryKey: true,
+ autoIncrement: true
+ },
+ created_at: {
+ type: DataTypes.TIME,
+ allowNull: true
+ },
+ updated_at: {
+ type: DataTypes.TIME,
+ allowNull: true
+ },
+ api_id: {
+ type: DataTypes.STRING(191),
+ allowNull: false
+ },
+ series: {
+ type: DataTypes.STRING(191),
+ allowNull: false
+ },
+ name: {
+ type: DataTypes.STRING(191),
+ allowNull: false
+ },
+ active: {
+ type: DataTypes.STRING(191),
+ allowNull: false
+ },
+ passive: {
+ type: DataTypes.STRING(191),
+ allowNull: false
+ }
+ }, {
+ tableName: 'item',
+ timestamps: false,
+ underscored: true,
+ freezeTableName: true
+ });
+};